Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(@dpc-sdp/ripple-ui-forms): add variant prop to datePicker #1051

Merged
merged 1 commit into from
Feb 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ interface Props {
id: string
label: string
timestamp?: string
variant: 'default' | 'reverse'
}

defineProps<Props>()
Expand All @@ -14,6 +15,7 @@ defineProps<Props>()
:key="`${id}-${timestamp}`"
:name="id"
type="RplFormDatePicker"
:variant="variant"
:label="label"
/>
</template>
5 changes: 3 additions & 2 deletions packages/ripple-ui-forms/src/inputs/datePicker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ export const datePicker: FormKitTypeDefinition = {
...defaultRplFormInputProps,
min: '$node.props.min',
max: '$node.props.max',
type: 'date'
type: 'date',
variant: '$node.props.variant'
}
}),
library: inputLibrary,
Expand All @@ -36,7 +37,7 @@ export const datePicker: FormKitTypeDefinition = {
/**
* An array of extra props to accept for this input.
*/
props: ['min', 'max', 'validationMeta', 'columnClasses'],
props: ['min', 'max', 'validationMeta', 'columnClasses', 'variant'],
/**
* Forces node.props.type to be this explicit value.
*/
Expand Down
Loading