-
Notifications
You must be signed in to change notification settings - Fork 299
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added new isMultiple and selectSize props (#4414)
* added new isMultiple and selectSize props * package-lock.json file removed * reset yarn.lock and package.json * Update docs/src/pages/[platform]/components/selectfield/react.mdx Co-authored-by: Heather Buchel <[email protected]> * Update docs/src/pages/[platform]/components/selectfield/react.mdx Co-authored-by: Heather Buchel <[email protected]> * Update docs/src/pages/[platform]/components/selectfield/react.mdx Co-authored-by: Heather Buchel <[email protected]> * Update docs/src/pages/[platform]/components/selectfield/react.mdx Co-authored-by: Heather Buchel <[email protected]> * testing in progress * added padding tokens * 2 snapshots updated * updated react tests * updated docs tests * added default values for isMultiple and selectSize * Update packages/react/src/primitives/Select/Select.tsx Co-authored-by: Heather Buchel <[email protected]> * test option background color change * Add disabled tokens/css, update demo * combine [multiple][size] check and use class * update snapshots * Update packages/ui/src/theme/tokens/components/select.ts * Create brave-timers-dream.md added new isMultiple and selectSize props * Update .changeset/brave-timers-dream.md Co-authored-by: Heather Buchel <[email protected]> * Create breezy-rabbits-change.md Added new isMultiple and selectSize props for the SelectField component * removed one extra file from .changeset * updated .changeset folder --------- Co-authored-by: Heather Buchel <[email protected]> Co-authored-by: Ioana Brooks <[email protected]> Co-authored-by: Heather Buchel <[email protected]>
- Loading branch information
1 parent
f7fbe97
commit d570694
Showing
19 changed files
with
393 additions
and
31 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
--- | ||
"@aws-amplify/ui-react": patch | ||
"@aws-amplify/ui": patch | ||
--- | ||
|
||
added new `isMultiple` and `selectSize` props for the `SelectField` component | ||
|
||
Example: | ||
|
||
``` | ||
<SelectField | ||
label="Fruit" | ||
descriptiveText="What's your favorite fruit?" | ||
selectSize={3} | ||
isMultiple={true} | ||
> | ||
<option value="apple">Apple</option> | ||
<option value="banana">Banana</option> | ||
<option value="orange">Orange</option> | ||
<option value="pineapple">Pineapple</option> | ||
<option value="kiwi">Kiwi</option> | ||
<option value="tangerine">Tangerine</option> | ||
</SelectField> | ||
``` |
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
16 changes: 16 additions & 0 deletions
16
.../src/pages/[platform]/components/selectfield/examples/SelectFieldMultipleStateExample.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,16 @@ | ||
import { SelectField } from '@aws-amplify/ui-react'; | ||
|
||
export const SelectFieldMultipleStateExample = () => ( | ||
<SelectField | ||
label="Fruit" | ||
descriptiveText="What's your favorite fruit?" | ||
isMultiple={true} | ||
> | ||
<option value="apple">Apple</option> | ||
<option value="banana">Banana</option> | ||
<option value="orange">Orange</option> | ||
<option value="pineapple">Pineapple</option> | ||
<option value="kiwi">Kiwi</option> | ||
<option value="tangerine">Tangerine</option> | ||
</SelectField> | ||
); |
16 changes: 16 additions & 0 deletions
16
docs/src/pages/[platform]/components/selectfield/examples/SelectFieldSelectSizeExample.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,16 @@ | ||
import { SelectField } from '@aws-amplify/ui-react'; | ||
|
||
export const SelectFieldSelectSizeExample = () => ( | ||
<SelectField | ||
label="Fruit" | ||
descriptiveText="What's your favorite fruit?" | ||
selectSize={3} | ||
> | ||
<option value="apple">Apple</option> | ||
<option value="banana">Banana</option> | ||
<option value="orange">Orange</option> | ||
<option value="pineapple">Pineapple</option> | ||
<option value="kiwi">Kiwi</option> | ||
<option value="tangerine">Tangerine</option> | ||
</SelectField> | ||
); |
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
Oops, something went wrong.