diff --git a/@stellar/design-system-website/docs/components/inputs/select.mdx b/@stellar/design-system-website/docs/components/inputs/select.mdx index e472af69..93761ba2 100644 --- a/@stellar/design-system-website/docs/components/inputs/select.mdx +++ b/@stellar/design-system-website/docs/components/inputs/select.mdx @@ -11,7 +11,7 @@ description: "Form input for selecting a single option from a list." ```tsx live - diff --git a/@stellar/design-system-website/src/componentPreview/selectPreview.tsx b/@stellar/design-system-website/src/componentPreview/selectPreview.tsx index 378da196..8929b1b0 100644 --- a/@stellar/design-system-website/src/componentPreview/selectPreview.tsx +++ b/@stellar/design-system-website/src/componentPreview/selectPreview.tsx @@ -21,17 +21,17 @@ export const selectPreview: ComponentPreview = { type: "select", prop: "fieldSize", options: [ - { - value: "md", - label: "MD", - }, { value: "sm", label: "SM", }, { - value: "xs", - label: "XS", + value: "md", + label: "MD", + }, + { + value: "lg", + label: "LG", }, ], }, @@ -45,21 +45,11 @@ export const selectPreview: ComponentPreview = { prop: "isLabelUppercase", label: "Uppercase label", }, - { - type: "checkbox", - prop: "isPill", - label: "Pill", - }, { type: "checkbox", prop: "isError", label: "Error", }, - { - type: "checkbox", - prop: "isExtraPadding", - label: "Extra padding", - }, { type: "select", prop: "note", diff --git a/@stellar/design-system/src/components/Select/index.tsx b/@stellar/design-system/src/components/Select/index.tsx index 0f00283d..238b54a5 100644 --- a/@stellar/design-system/src/components/Select/index.tsx +++ b/@stellar/design-system/src/components/Select/index.tsx @@ -10,7 +10,7 @@ export interface SelectProps { id: string; // Note: cannot use "size" here because it's input's native property /** Size of the select */ - fieldSize: "md" | "sm" | "xs"; + fieldSize: "sm" | "md" | "lg"; /** Select options or optgroup with options */ children: React.ReactNode; /** Label of the select */ @@ -21,12 +21,8 @@ export interface SelectProps { error?: string | string; /** Make label uppercase */ isLabelUppercase?: boolean; - /** Pill shaped select */ - isPill?: boolean; /** Select error without a message */ isError?: boolean; - /** Select with extra padding */ - isExtraPadding?: boolean; /** Use a specific select rather than a generic HTML select (useful for Formik or otherwise controlled selects) */ customSelect?: React.ReactElement; } @@ -49,9 +45,7 @@ export const Select: React.FC = ({ note, error, isLabelUppercase, - isPill, isError, - isExtraPadding, customSelect, ...props }: Props) => { @@ -59,8 +53,6 @@ export const Select: React.FC = ({ `Select--${fieldSize}`, ...(props.disabled ? ["Select--disabled"] : []), ...(isError || error ? ["Select--error"] : []), - ...(isPill ? ["Select--pill"] : []), - ...(isExtraPadding ? ["Select--extra-padding"] : []), ].join(" "); const baseSelectProps = { @@ -71,11 +63,7 @@ export const Select: React.FC = ({ return (
{label && ( -