Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: sematic typos #2408

Merged
merged 2 commits into from
Feb 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions apps/docs/components/docs/components/swatch-colors-set.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ type SwatchColors = {

type SwatchSetProps = {
colors: SwatchColors[];
isSematic?: boolean;
isSemantic?: boolean;
};

const scaleIndexMap: Record<number, string> = {
Expand Down Expand Up @@ -90,7 +90,7 @@ const Swatch = ({color, scale}: {color: string; scale?: string}) => {
);
};

const SematicSwatch = ({
const SemanticSwatch = ({
color,
className,
textClassName,
Expand Down Expand Up @@ -139,15 +139,15 @@ const SematicSwatch = ({
);
};

const SwatchSet = ({colors, isSematic = false}: SwatchSetProps) => (
const SwatchSet = ({colors, isSemantic = false}: SwatchSetProps) => (
<div className="flex flex-row flex-wrap items-center justify-center">
{colors.map(({title, items}) => (
<div key={title} className="flex flex-col items-start w-full h-full">
<h2 className="text-xl font-bold text-foreground">{title}</h2>
<div className="flex flex-row flex-wrap items-center justify-start w-full h-full px-4 py-1">
{items.map((c, index) =>
isSematic ? (
<SematicSwatch
isSemantic ? (
<SemanticSwatch
key={`${c.color}-${index}`}
className={c.className}
color={c.color}
Expand Down Expand Up @@ -218,7 +218,7 @@ export const CommonColors = () => {
export const SemanticColors = () => {
return (
<SwatchSet
isSematic
isSemantic
colors={[
{
title: "Layout",
Expand Down
14 changes: 7 additions & 7 deletions packages/core/theme/stories/colors.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ type SwatchColors = {

type SwatchSetProps = {
colors: SwatchColors[];
isSematic?: boolean;
isSemantic?: boolean;
};

const Swatch = ({color}: {color: string}) => {
Expand Down Expand Up @@ -47,7 +47,7 @@ const Swatch = ({color}: {color: string}) => {
);
};

const SematicSwatch = ({
const SemanticSwatch = ({
color,
className,
textClassName,
Expand All @@ -65,15 +65,15 @@ const SematicSwatch = ({
);
};

const SwatchSet = ({colors, isSematic = false}: SwatchSetProps) => (
const SwatchSet = ({colors, isSemantic = false}: SwatchSetProps) => (
<div className="flex flex-row flex-wrap items-center justify-center w-full h-full p-2">
{colors.map(({title, items}) => (
<div key={title} className="flex flex-col items-start w-full h-full">
<h2 className="text-xl font-bold text-foreground">{title}</h2>
<div className="flex flex-row flex-wrap items-center justify-start w-full h-full p-4">
{items.map((c, index) =>
isSematic ? (
<SematicSwatch
isSemantic ? (
<SemanticSwatch
key={`${c.color}-${index}`}
className={c.className}
color={c.color}
Expand All @@ -93,7 +93,7 @@ export default {
title: "Foundations/Colors",
component: SwatchSet,
argTypes: {
isSematic: {
isSemantic: {
control: false,
},
},
Expand Down Expand Up @@ -146,7 +146,7 @@ export const CommonColors = {

export const SemanticColors = {
args: {
isSematic: true,
isSemantic: true,
colors: [
{
title: "Layout",
Expand Down
Loading