mirror of
https://github.com/kennethnym/aris.git
synced 2026-03-20 09:01:19 +00:00
Introduce Button.Icon to enforce consistent icon styling (size, theme-aware color) instead of hardcoding Feather props at each call site. Update showcase and json-render registry to use it. Co-authored-by: Ona <no-reply@ona.com>
43 lines
972 B
TypeScript
43 lines
972 B
TypeScript
import { View } from "react-native"
|
|
import tw from "twrnc"
|
|
|
|
import { Button } from "./button"
|
|
import { type Showcase, Section } from "../showcase"
|
|
|
|
function ButtonShowcase() {
|
|
return (
|
|
<View style={tw`gap-6`}>
|
|
<Section title="Default">
|
|
<Button style={tw`self-start`} label="Press me" />
|
|
</Section>
|
|
<Section title="Leading icon">
|
|
<Button
|
|
style={tw`self-start`}
|
|
label="Add item"
|
|
leadingIcon={<Button.Icon name="plus" />}
|
|
/>
|
|
</Section>
|
|
<Section title="Trailing icon">
|
|
<Button
|
|
style={tw`self-start`}
|
|
label="Next"
|
|
trailingIcon={<Button.Icon name="arrow-right" />}
|
|
/>
|
|
</Section>
|
|
<Section title="Both icons">
|
|
<Button
|
|
style={tw`self-start`}
|
|
label="Download"
|
|
leadingIcon={<Button.Icon name="download" />}
|
|
trailingIcon={<Button.Icon name="chevron-down" />}
|
|
/>
|
|
</Section>
|
|
</View>
|
|
)
|
|
}
|
|
|
|
export const buttonShowcase: Showcase = {
|
|
title: "Button",
|
|
component: ButtonShowcase,
|
|
}
|