-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
textarea demos and one missed button demo renamed
- Loading branch information
1 parent
eeb9d53
commit 0455396
Showing
18 changed files
with
72 additions
and
88 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
6 changes: 3 additions & 3 deletions
6
docs/data/base/components/button/UnstyledButtonsSpan/system/index.tsx.preview
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<CustomButton slots={{ root: 'span' }}>Button</CustomButton> | ||
<CustomButton slots={{ root: 'span' }} disabled> | ||
<Button slots={{ root: 'span' }}>Button</Button> | ||
<Button slots={{ root: 'span' }} disabled> | ||
Disabled | ||
</CustomButton> | ||
</Button> |
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
38 changes: 17 additions & 21 deletions
38
docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.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 |
---|---|---|
@@ -1,33 +1,29 @@ | ||
import * as React from 'react'; | ||
import { Button, ButtonProps } from '@mui/base/Button'; | ||
import { Button as BaseButton, ButtonProps } from '@mui/base/Button'; | ||
import Stack from '@mui/material/Stack'; | ||
import clsx from 'clsx'; | ||
|
||
export default function UnstyledButtonsSimple() { | ||
return ( | ||
<Stack spacing={2} direction="row"> | ||
<CustomButton className="hover:bg-violet-600 active:bg-violet-700"> | ||
Button | ||
</CustomButton> | ||
<CustomButton disabled slots={{ root: 'span' }}> | ||
<Button className="hover:bg-violet-600 active:bg-violet-700">Button</Button> | ||
<Button disabled slots={{ root: 'span' }}> | ||
Disabled | ||
</CustomButton> | ||
</Button> | ||
</Stack> | ||
); | ||
} | ||
|
||
const CustomButton = React.forwardRef<HTMLButtonElement, ButtonProps>( | ||
(props, ref) => { | ||
const { className, ...other } = props; | ||
return ( | ||
<Button | ||
ref={ref} | ||
className={clsx( | ||
'cursor-pointer disabled:cursor-not-allowed text-sm font-sans bg-violet-500 text-white rounded-lg font-semibold px-4 py-2 border-none disabled:opacity-50', | ||
className, | ||
)} | ||
{...other} | ||
/> | ||
); | ||
}, | ||
); | ||
const Button = React.forwardRef<HTMLButtonElement, ButtonProps>((props, ref) => { | ||
const { className, ...other } = props; | ||
return ( | ||
<BaseButton | ||
ref={ref} | ||
className={clsx( | ||
'cursor-pointer disabled:cursor-not-allowed text-sm font-sans bg-violet-500 text-white rounded-lg font-semibold px-4 py-2 border-none disabled:opacity-50', | ||
className, | ||
)} | ||
{...other} | ||
/> | ||
); | ||
}); |
8 changes: 3 additions & 5 deletions
8
docs/data/base/components/button/UnstyledButtonsSpan/tailwind/index.tsx.preview
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 |
---|---|---|
@@ -1,6 +1,4 @@ | ||
<CustomButton className="hover:bg-violet-600 active:bg-violet-700"> | ||
Button | ||
</CustomButton> | ||
<CustomButton disabled slots={{ root: 'span' }}> | ||
<Button className="hover:bg-violet-600 active:bg-violet-700">Button</Button> | ||
<Button disabled slots={{ root: 'span' }}> | ||
Disabled | ||
</CustomButton> | ||
</Button> |
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
2 changes: 1 addition & 1 deletion
2
docs/data/base/components/textarea-autosize/EmptyTextarea.tsx.preview
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 |
---|---|---|
@@ -1 +1 @@ | ||
<StyledTextarea aria-label="empty textarea" placeholder="Empty" /> | ||
<Textarea aria-label="empty textarea" placeholder="Empty" /> |
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
2 changes: 1 addition & 1 deletion
2
docs/data/base/components/textarea-autosize/MaxHeightTextarea.tsx.preview
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<StyledTextarea | ||
<Textarea | ||
maxRows={4} | ||
aria-label="maximum height" | ||
placeholder="Maximum 4 rows" | ||
|
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
6 changes: 1 addition & 5 deletions
6
docs/data/base/components/textarea-autosize/MinHeightTextarea.tsx.preview
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 |
---|---|---|
@@ -1,5 +1 @@ | ||
<StyledTextarea | ||
aria-label="minimum height" | ||
minRows={3} | ||
placeholder="Minimum 3 rows" | ||
/> | ||
<Textarea aria-label="minimum height" minRows={3} placeholder="Minimum 3 rows" /> |
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
2 changes: 1 addition & 1 deletion
2
docs/data/base/components/textarea-autosize/UnstyledTextarea/system/index.tsx.preview
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 |
---|---|---|
@@ -1 +1 @@ | ||
<StyledTextarea aria-label="empty textarea" placeholder="Empty" /> | ||
<Textarea aria-label="empty textarea" placeholder="Empty" /> |