Skip to content

Commit b783ff1

Browse files
authored
chore: Add interface markdown for Button style API (#3600)
1 parent dee2474 commit b783ff1

File tree

2 files changed

+36
-0
lines changed

2 files changed

+36
-0
lines changed

src/__tests__/snapshot-tests/__snapshots__/documenter.test.ts.snap

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4223,6 +4223,18 @@ If the \`rel\` property is provided, it overrides the default behavior.",
42234223
"type": "string",
42244224
},
42254225
{
4226+
"description": "Specifies an object of selectors and properties that are used to apply custom styles.
4227+
4228+
- \`root.background\` {active, default, disabled, hover} - (Optional) Background for component states.
4229+
- \`root.borderColor\` {active, default, disabled, hover} - (Optional) Border color for component states.
4230+
- \`root.borderRadius\` (string) - (Optional) Border radius style.
4231+
- \`root.borderWidth\` (string) - (Optional) Border width style.
4232+
- \`root.color\` {active, default, disabled, hover} - (Optional) Color for component states.
4233+
- \`root.focusRing.borderColor\` (string) - (Optional) Focus ring border color.
4234+
- \`root.focusRing.borderRadius\` (string) - (Optional) Focus ring border radius.
4235+
- \`root.focusRing.borderWidth\` (string) - (Optional) Focus ring border width.
4236+
- \`root.paddingBlock\` (string) - (Optional) Block dimension padding.
4237+
- \`root.paddingInline\` (string) - (Optional) Inline dimension padding.",
42264238
"inlineType": {
42274239
"name": "ButtonProps.Style",
42284240
"properties": [
@@ -20130,6 +20142,18 @@ It prevents users from clicking the button, but it can still be focused.",
2013020142
"type": "string",
2013120143
},
2013220144
{
20145+
"description": "Specifies an object of selectors and properties that are used to apply custom styles.
20146+
20147+
- \`root.background\` {active, default, disabled, hover} - (Optional) Background for component states.
20148+
- \`root.borderColor\` {active, default, disabled, hover} - (Optional) Border color for component states.
20149+
- \`root.borderRadius\` (string) - (Optional) Border radius style.
20150+
- \`root.borderWidth\` (string) - (Optional) Border width style.
20151+
- \`root.color\` {active, default, disabled, hover} - (Optional) Color for component states.
20152+
- \`root.focusRing.borderColor\` (string) - (Optional) Focus ring border color.
20153+
- \`root.focusRing.borderRadius\` (string) - (Optional) Focus ring border radius.
20154+
- \`root.focusRing.borderWidth\` (string) - (Optional) Focus ring border width.
20155+
- \`root.paddingBlock\` (string) - (Optional) Block dimension padding.
20156+
- \`root.paddingInline\` (string) - (Optional) Inline dimension padding.",
2013320157
"inlineType": {
2013420158
"name": "ButtonProps.Style",
2013520159
"properties": [

src/button/interfaces.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,18 @@ export interface BaseButtonProps {
102102
i18nStrings?: ButtonProps.I18nStrings;
103103

104104
/**
105+
* Specifies an object of selectors and properties that are used to apply custom styles.
106+
*
107+
* - `root.background` {active, default, disabled, hover} - (Optional) Background for component states.
108+
* - `root.borderColor` {active, default, disabled, hover} - (Optional) Border color for component states.
109+
* - `root.borderRadius` (string) - (Optional) Border radius style.
110+
* - `root.borderWidth` (string) - (Optional) Border width style.
111+
* - `root.color` {active, default, disabled, hover} - (Optional) Color for component states.
112+
* - `root.focusRing.borderColor` (string) - (Optional) Focus ring border color.
113+
* - `root.focusRing.borderRadius` (string) - (Optional) Focus ring border radius.
114+
* - `root.focusRing.borderWidth` (string) - (Optional) Focus ring border width.
115+
* - `root.paddingBlock` (string) - (Optional) Block dimension padding.
116+
* - `root.paddingInline` (string) - (Optional) Inline dimension padding.
105117
* @awsuiSystem core
106118
*/
107119
style?: ButtonProps.Style;

0 commit comments

Comments
 (0)