-
-
Notifications
You must be signed in to change notification settings - Fork 190
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added label docs, some extendable panel updates and border style update
- Loading branch information
Showing
33 changed files
with
185 additions
and
61 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
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
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
--- | ||
id: label | ||
title: Label | ||
sidebar_label: Label | ||
--- | ||
|
||
The `Label` component is a simple and versatile component used to display text content with a label style. | ||
You usually use it to display a label for an input field, like a checkbox, or radio button. | ||
|
||
## Usage | ||
|
||
To use the `Label` component, import it from your components. You can pass a `border` prop to add a border around the label. | ||
You can also pass any of the HTML `label` props, such as `htmlFor`, `className`, and `style`. | ||
|
||
|
||
|
||
import CodeSample from "../../src/CodeSample"; | ||
import CodeBlock from "@theme/CodeBlock"; | ||
|
||
## Label with a Checkbox | ||
|
||
Simple example of using the `Label` component to create a basic surface for content. | ||
|
||
import LabelCheckboxDemo from '../../samples/components/label/label_checkbox'; | ||
import LabelCheckboxSource from '!!raw-loader!../../samples/components/label/label_checkbox'; | ||
|
||
<CodeSample> | ||
<LabelCheckboxDemo/> | ||
</CodeSample> | ||
|
||
<CodeBlock language="tsx">{LabelCheckboxSource}</CodeBlock> | ||
|
||
## Label with a Radio Button | ||
|
||
This is an example of using the `Label` component with a radio button. | ||
|
||
import LabelRadioButtonDemo from '../../samples/components/label/label_radio_group'; | ||
import LabelRadioButtonSource from '!!raw-loader!../../samples/components/label/label_radio_group'; | ||
|
||
<CodeSample> | ||
<LabelRadioButtonDemo/> | ||
</CodeSample> | ||
|
||
<CodeBlock language="tsx">{LabelRadioButtonSource}</CodeBlock> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import React from "react"; | ||
import { Checkbox, Label } from "@firecms/ui"; | ||
|
||
export default function LabelCheckboxDemo() { | ||
|
||
const [checked, setChecked] = React.useState(false); | ||
|
||
return ( | ||
<Label | ||
border={true} | ||
className="cursor-pointer p-2 flex items-center gap-2 [&:has(:checked)]:bg-gray-100 dark:[&:has(:checked)]:bg-gray-800" | ||
htmlFor="my-filter" | ||
> | ||
<Checkbox id="my-filter" | ||
checked={checked} | ||
size={"small"} | ||
onCheckedChange={setChecked}/> | ||
Filter for null values | ||
</Label> | ||
); | ||
} |
Oops, something went wrong.