-
-
Notifications
You must be signed in to change notification settings - Fork 7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(VListItemSubtitle): add new opacity prop
resolves #16446
- Loading branch information
1 parent
2abb221
commit 565a794
Showing
3 changed files
with
40 additions
and
7 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
39 changes: 39 additions & 0 deletions
39
packages/vuetify/src/components/VList/VListItemSubtitle.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
// Composables | ||
import { makeComponentProps } from '@/composables/component' | ||
import { makeTagProps } from '@/composables/tag' | ||
|
||
// Utilities | ||
import { genericComponent, propsFactory, useRender } from '@/util' | ||
|
||
export const makeVListItemSubtitleProps = propsFactory({ | ||
opacity: [Number, String], | ||
|
||
...makeComponentProps(), | ||
...makeTagProps(), | ||
}, 'VListItemSubtitle') | ||
|
||
export const VListItemSubtitle = genericComponent()({ | ||
name: 'VListItemSubtitle', | ||
|
||
props: makeVListItemSubtitleProps(), | ||
|
||
setup (props, { slots }) { | ||
useRender(() => ( | ||
<props.tag | ||
class={[ | ||
'v-list-item-subtitle', | ||
props.class, | ||
]} | ||
style={[ | ||
{ '--v-list-item-subtitle-opacity': props.opacity }, | ||
props.style, | ||
]} | ||
v-slots={ slots } | ||
/> | ||
)) | ||
|
||
return {} | ||
}, | ||
}) | ||
|
||
export type VListItemSubtitle = InstanceType<typeof VListItemSubtitle> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters