-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add ClassName prop to SearchField and TextField + add SearchField arg…
…types
- Loading branch information
Showing
7 changed files
with
236 additions
and
1 deletion.
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
177 changes: 177 additions & 0 deletions
177
__docs__/wonder-blocks-search-field/search-field.argtypes.ts
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,177 @@ | ||
export default { | ||
clearAriaLabel: { | ||
description: `ARIA label for the clear button. Defaults to "Clear search".`, | ||
table: { | ||
type: { | ||
summary: "string", | ||
}, | ||
category: "Accessibility", | ||
}, | ||
control: { | ||
type: "text", | ||
}, | ||
}, | ||
id: { | ||
description: `The unique identifier for the input. If one is not | ||
provided, a unique id will be generated.`, | ||
type: {name: "string", required: true}, | ||
table: { | ||
type: { | ||
summary: "string", | ||
}, | ||
}, | ||
control: { | ||
type: "text", | ||
}, | ||
}, | ||
value: { | ||
description: "The text input value.", | ||
type: {name: "string", required: true}, | ||
table: { | ||
type: { | ||
summary: "string", | ||
}, | ||
}, | ||
control: {type: "text"}, | ||
}, | ||
placeholder: { | ||
description: `Provide hints or examples of what to enter. | ||
This shows up as a grayed out text in the field before | ||
a value is entered.`, | ||
table: { | ||
type: { | ||
summary: "string", | ||
}, | ||
}, | ||
control: { | ||
type: "text", | ||
}, | ||
}, | ||
autoFocus: { | ||
description: "Whether this field should autofocus on page load.", | ||
table: { | ||
type: { | ||
summary: "boolean", | ||
}, | ||
defaultValue: { | ||
summary: "false", | ||
}, | ||
}, | ||
control: { | ||
type: "boolean", | ||
}, | ||
}, | ||
disabled: { | ||
description: `Makes a read-only input field that cannot be focused. | ||
Defaults to false.`, | ||
table: { | ||
type: { | ||
summary: "boolean", | ||
}, | ||
defaultValue: { | ||
summary: "false", | ||
}, | ||
}, | ||
control: { | ||
type: "boolean", | ||
}, | ||
}, | ||
light: { | ||
description: | ||
"Change the default focus ring color to fit a dark background.", | ||
table: { | ||
type: { | ||
summary: "boolean", | ||
}, | ||
defaultValue: { | ||
summary: "false", | ||
}, | ||
}, | ||
control: { | ||
type: "boolean", | ||
}, | ||
}, | ||
style: { | ||
description: "Custom styles for the main wrapper.", | ||
table: { | ||
type: { | ||
summary: "Style", | ||
}, | ||
defaultValue: { | ||
summary: "StyleType", | ||
}, | ||
}, | ||
control: { | ||
type: "select", | ||
options: ["box", "underline"], | ||
}, | ||
}, | ||
className: { | ||
description: "Optional CSS classes for the input field.", | ||
table: { | ||
type: { | ||
summary: "string", | ||
}, | ||
}, | ||
control: { | ||
type: "text", | ||
}, | ||
}, | ||
testId: { | ||
description: "Test ID used for e2e testing.", | ||
table: { | ||
type: { | ||
summary: "string", | ||
}, | ||
}, | ||
control: { | ||
type: "text", | ||
}, | ||
}, | ||
onChange: { | ||
description: "Called when the value has changed.", | ||
table: { | ||
type: { | ||
summary: "function", | ||
}, | ||
category: "Events", | ||
}, | ||
}, | ||
onClick: { | ||
description: `Handler that is triggered when this component is clicked. | ||
For example, use this to adjust focus in parent component.`, | ||
table: { | ||
type: { | ||
summary: "function", | ||
}, | ||
category: "Events", | ||
}, | ||
}, | ||
onKeyDown: { | ||
description: "Called when a key is pressed.", | ||
table: { | ||
type: { | ||
summary: "function", | ||
}, | ||
category: "Events", | ||
}, | ||
}, | ||
onFocus: { | ||
description: "Called when the element has been focused.", | ||
table: { | ||
type: { | ||
summary: "function", | ||
}, | ||
category: "Events", | ||
}, | ||
}, | ||
onBlur: { | ||
description: "Called when the element has been blurred.", | ||
table: { | ||
type: { | ||
summary: "function", | ||
}, | ||
category: "Events", | ||
}, | ||
}, | ||
}; |
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
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