-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2042 from dxc-technology/rarrojolopez/buttons-sem…
…antic Semantic buttons and button size changes
- Loading branch information
Showing
29 changed files
with
8,009 additions
and
811 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
23 changes: 23 additions & 0 deletions
23
apps/website/screens/components/button/code/examples/semantic.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,23 @@ | ||
import { DxcButton, DxcFlex, DxcInset } from "@dxc-technology/halstack-react"; | ||
|
||
const code = `() => { | ||
return ( | ||
<DxcInset space="2rem"> | ||
<DxcFlex gap="1.5rem"> | ||
<DxcButton label="Search" /> | ||
<DxcButton semantic="error" label="Cancel" /> | ||
<DxcButton semantic="warning" label="Report" /> | ||
<DxcButton semantic="success" label="Confirm" /> | ||
<DxcButton semantic="info" label="Details" /> | ||
</DxcFlex> | ||
</DxcInset> | ||
); | ||
}`; | ||
|
||
const scope = { | ||
DxcButton, | ||
DxcFlex, | ||
DxcInset, | ||
}; | ||
|
||
export default { code, scope }; |
39 changes: 39 additions & 0 deletions
39
apps/website/screens/components/button/code/examples/sizes.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,39 @@ | ||
import { DxcButton, DxcInset, DxcFlex } from "@dxc-technology/halstack-react"; | ||
|
||
const code = `() => { | ||
return ( | ||
<DxcInset space="2rem"> | ||
<DxcFlex gap="1.5rem" direction="column"> | ||
<DxcFlex gap="1.5rem"> | ||
<DxcButton icon="person" semantic="default" size={{ height: "small", width: "small" }} /> | ||
<DxcButton label="Submit" size={{ height: "small", width: "medium" }} /> | ||
<DxcButton label="Search" icon="search" size={{ height: "small", width: "large" }} /> | ||
<DxcButton label="Edit" size={{ height: "small", width: "fitContent" }} /> | ||
<DxcButton label="Learn more" size={{ height: "small", width: "fillParent" }} /> | ||
</DxcFlex> | ||
<DxcFlex gap="1.5rem"> | ||
<DxcButton icon="person" semantic="default" size={{ height: "medium", width: "small" }} /> | ||
<DxcButton label="Submit" size={{ height: "medium", width: "medium" }} /> | ||
<DxcButton label="Search" icon="search" size={{ height: "medium", width: "large" }} /> | ||
<DxcButton label="Edit" size={{ height: "medium", width: "fitContent" }} /> | ||
<DxcButton label="Learn more" size={{ height: "medium", width: "fillParent" }} /> | ||
</DxcFlex> | ||
<DxcFlex gap="1.5rem"> | ||
<DxcButton icon="person" semantic="default" size={{ height: "large", width: "small"}} /> | ||
<DxcButton label="Submit" size={{ height: "large", width: "medium" }} /> | ||
<DxcButton label="Search" icon="search" size={{ height: "large", width: "large" }} /> | ||
<DxcButton label="Edit" size={{ height: "large", width: "fitContent" }} /> | ||
<DxcButton label="Learn more" size={{ height: "large", width: "fillParent" }} /> | ||
</DxcFlex> | ||
</DxcFlex> | ||
</DxcInset> | ||
); | ||
}`; | ||
|
||
const scope = { | ||
DxcButton, | ||
DxcInset, | ||
DxcFlex, | ||
}; | ||
|
||
export default { code, scope }; |
Oops, something went wrong.