-
-
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(VCardText/Subtitle): add opacity support
- Loading branch information
1 parent
565a794
commit 8633854
Showing
7 changed files
with
82 additions
and
13 deletions.
There are no files selected for viewing
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
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
This file was deleted.
Oops, something went wrong.
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 makeVCardSubtitleProps = propsFactory({ | ||
opacity: [Number, String], | ||
|
||
...makeComponentProps(), | ||
...makeTagProps(), | ||
}, 'VCardSubtitle') | ||
|
||
export const VCardSubtitle = genericComponent()({ | ||
name: 'VCardSubtitle', | ||
|
||
props: makeVCardSubtitleProps(), | ||
|
||
setup (props, { slots }) { | ||
useRender(() => ( | ||
<props.tag | ||
class={[ | ||
'v-card-subtitle', | ||
props.class, | ||
]} | ||
style={[ | ||
{ '--v-card-subtitle-opacity': props.opacity }, | ||
props.style, | ||
]} | ||
v-slots={ slots } | ||
/> | ||
)) | ||
|
||
return {} | ||
}, | ||
}) | ||
|
||
export type VCardSubtitle = InstanceType<typeof VCardSubtitle> |
This file was deleted.
Oops, something went wrong.
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 makeVCardTextProps = propsFactory({ | ||
opacity: [Number, String], | ||
|
||
...makeComponentProps(), | ||
...makeTagProps(), | ||
}, 'VCardText') | ||
|
||
export const VCardText = genericComponent()({ | ||
name: 'VCardText', | ||
|
||
props: makeVCardTextProps(), | ||
|
||
setup (props, { slots }) { | ||
useRender(() => ( | ||
<props.tag | ||
class={[ | ||
'v-card-text', | ||
props.class, | ||
]} | ||
style={[ | ||
{ '--v-card-text-opacity': props.opacity }, | ||
props.style, | ||
]} | ||
v-slots={ slots } | ||
/> | ||
)) | ||
|
||
return {} | ||
}, | ||
}) | ||
|
||
export type VCardText = InstanceType<typeof VCardText> |
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