code quality
Some checks failed
CI / lint-typecheck (pull_request) Failing after 10s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
Some checks failed
CI / lint-typecheck (pull_request) Failing after 10s
CI / tests (pull_request) Has been skipped
CI / contract-tests (pull_request) Has been skipped
CI / e2e-tests (pull_request) Has been skipped
CI / comment-pr (pull_request) Has been skipped
CI / commit-types (pull_request) Has been skipped
This commit is contained in:
@@ -12,13 +12,15 @@ export interface SegmentedControlProps {
|
||||
activeId: string;
|
||||
onChange: (id: string) => void;
|
||||
fullWidth?: boolean;
|
||||
'data-testid'?: string;
|
||||
}
|
||||
|
||||
export const SegmentedControl = ({
|
||||
options,
|
||||
activeId,
|
||||
export const SegmentedControl = ({
|
||||
options,
|
||||
activeId,
|
||||
onChange,
|
||||
fullWidth = false
|
||||
fullWidth = false,
|
||||
'data-testid': dataTestId
|
||||
}: SegmentedControlProps) => {
|
||||
return (
|
||||
<Surface
|
||||
@@ -32,6 +34,7 @@ export const SegmentedControl = ({
|
||||
const isSelected = option.id === activeId;
|
||||
return (
|
||||
<button
|
||||
data-testid={dataTestId ? `${dataTestId}-${option.id}` : undefined}
|
||||
key={option.id}
|
||||
onClick={() => onChange(option.id)}
|
||||
className={`flex-1 flex items-center justify-center gap-2 px-4 py-1.5 text-xs font-bold uppercase tracking-widest transition-all rounded-md ${
|
||||
|
||||
Reference in New Issue
Block a user