-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[open-formulieren/open-forms#3993] Added deriveAddress boolean to add…
…ressNL component
- Loading branch information
Showing
8 changed files
with
122 additions
and
0 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 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,27 @@ | ||
import {Meta, StoryObj} from '@storybook/react'; | ||
|
||
import {withFormik} from '@/sb-decorators'; | ||
|
||
import DeriveAddress from './derive-address'; | ||
|
||
export default { | ||
title: 'Formio/Builder/DeriveAddress', | ||
component: DeriveAddress, | ||
decorators: [withFormik], | ||
parameters: { | ||
controls: {hideNoControlsWarning: true}, | ||
docs: { | ||
source: { | ||
type: 'dynamic', | ||
excludeDecorators: true, | ||
}, | ||
}, | ||
modal: {noModal: true}, | ||
formik: {initialValues: {showCharCount: false}}, | ||
}, | ||
} as Meta<typeof DeriveAddress>; | ||
|
||
export const Default: StoryObj<typeof DeriveAddress> = { | ||
render: () => <DeriveAddress />, | ||
args: {}, | ||
}; |
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,25 @@ | ||
import {FormattedMessage, useIntl} from 'react-intl'; | ||
|
||
import {Checkbox} from '../formio'; | ||
|
||
const DeriveAddress = () => { | ||
const intl = useIntl(); | ||
const tooltip = intl.formatMessage({ | ||
description: "Tooltip for 'DeriveAddress' builder field", | ||
defaultMessage: 'Derive address.', | ||
}); | ||
return ( | ||
<Checkbox | ||
name="disabled" | ||
label={ | ||
<FormattedMessage | ||
description="Label for 'DeriveAddress' builder field" | ||
defaultMessage="Derive address" | ||
/> | ||
} | ||
tooltip={tooltip} | ||
/> | ||
); | ||
}; | ||
|
||
export default DeriveAddress; |
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 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