-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- `Radioset` component - `Main`, `Nav`, `Header`, `Footer`, `Aside` components - complete `Button`/`ButtonAnchor` appearances from Material 3 - rename `ButtonAnchor` to `AnchorButton` - extract color-scheme from official Material 3 values - updated website with default color-scheme and latest components
- Loading branch information
Showing
61 changed files
with
3,218 additions
and
856 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -15,7 +15,6 @@ | |
"**/.git": true, | ||
"build": true, | ||
"coverage": true, | ||
"dist": true, | ||
"node_modules": true | ||
} | ||
} | ||
|
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 |
---|---|---|
|
@@ -5,6 +5,5 @@ | |
} | ||
|
||
.ninjaKit > strong { | ||
color: #c00; | ||
font-weight: 500; | ||
} |
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,5 @@ | ||
import "@fontsource/roboto/latin-400.css"; | ||
import "@fontsource/roboto/latin-500.css"; | ||
import "ninjakit/style.css"; | ||
import "ninjakit/color-scheme/default.css"; | ||
import "ninjakit/color-scheme"; | ||
import "./style.css"; |
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,26 @@ | ||
import { AnchorButton, Card } from "ninjakit"; | ||
import { FunctionComponent } from "react"; | ||
import { MdThumbUp } from "react-icons/md"; | ||
|
||
export const AnchorButtonExamples: FunctionComponent = () => ( | ||
<Card appearance="elevated" title="AnchorButton"> | ||
<section> | ||
<AnchorButton appearance="elevated" href="#"> | ||
Elevated | ||
</AnchorButton> | ||
<AnchorButton href="#">Filled</AnchorButton> | ||
<AnchorButton href="#"> | ||
<MdThumbUp /> With Icon | ||
</AnchorButton> | ||
<AnchorButton href="#" target="_blank"> | ||
With External Target | ||
</AnchorButton> | ||
<AnchorButton appearance="outlined" href="#"> | ||
Outlined | ||
</AnchorButton> | ||
<AnchorButton appearance="text" href="#"> | ||
Text | ||
</AnchorButton> | ||
</section> | ||
</Card> | ||
); |
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,32 @@ | ||
import { Button, Card } from "ninjakit"; | ||
import { FunctionComponent } from "react"; | ||
import { MdThumbUp } from "react-icons/md"; | ||
|
||
export const ButtonExamples: FunctionComponent = () => ( | ||
<Card appearance="elevated" title="Button"> | ||
<section> | ||
<Button appearance="elevated">Elevated</Button> | ||
<Button>Filled</Button> | ||
<Button> | ||
<MdThumbUp /> With Icon | ||
</Button> | ||
<Button appearance="outlined">Outlined</Button> | ||
<Button appearance="text">Text</Button> | ||
</section> | ||
<section> | ||
<Button appearance="elevated" disabled> | ||
Elevated | ||
</Button> | ||
<Button disabled>Filled</Button> | ||
<Button disabled> | ||
<MdThumbUp /> With Icon | ||
</Button> | ||
<Button appearance="outlined" disabled> | ||
Outlined | ||
</Button> | ||
<Button appearance="text" disabled> | ||
Text | ||
</Button> | ||
</section> | ||
</Card> | ||
); |
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,25 @@ | ||
import { Card, useColorScheme } from "ninjakit"; | ||
import { FunctionComponent } from "react"; | ||
|
||
export const ColorScheme: FunctionComponent = () => { | ||
const { colorScheme, setColorScheme } = useColorScheme(); | ||
|
||
return ( | ||
<Card> | ||
<label htmlFor="color-scheme">Color Scheme</label> | ||
<section> | ||
<select | ||
id="color-scheme" | ||
onChange={(event) => | ||
setColorScheme(event.target.value as "light" | "dark" | "system") | ||
} | ||
value={colorScheme} | ||
> | ||
<option value="light">Light</option> | ||
<option value="dark">Dark</option> | ||
<option value="system">System default</option> | ||
</select> | ||
</section> | ||
</Card> | ||
); | ||
}; |
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,15 @@ | ||
import { FunctionComponent } from "react"; | ||
|
||
import { AnchorButtonExamples } from "./anchor-button"; | ||
import { ButtonExamples } from "./button"; | ||
import { RadiosetExamples } from "./radioset"; | ||
|
||
export const Examples: FunctionComponent = () => ( | ||
<> | ||
<ButtonExamples /> | ||
<AnchorButtonExamples /> | ||
<RadiosetExamples /> | ||
</> | ||
); | ||
|
||
export { ColorScheme } from "./color-scheme"; |
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,28 @@ | ||
import { Card, Radioset } from "ninjakit"; | ||
import { FunctionComponent } from "react"; | ||
|
||
export const RadiosetExamples: FunctionComponent = () => ( | ||
<Card appearance="elevated"> | ||
<Radioset<"apple" | "banana" | "grapes"> | ||
defaultValue="banana" | ||
label="Choose a fruit:" | ||
name="test" | ||
options={[ | ||
{ | ||
label: "🍎 Apple", | ||
value: "apple", | ||
}, | ||
{ label: "🍌 Banana", value: "banana" }, | ||
{ | ||
children: ( | ||
<span> | ||
🍇 <span>Grapes</span> | ||
</span> | ||
), | ||
label: "Grapes", | ||
value: "grapes", | ||
}, | ||
]} | ||
/> | ||
</Card> | ||
); |
This file was deleted.
Oops, something went wrong.
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
Oops, something went wrong.