✨(react) add the possibility to hide select label
Based on recent feedbacks this feature was needed. It is important for the label to still be accessible to screen readers, that's why we introduced the offscreen class. Resolve #60
This commit is contained in:
@@ -56,6 +56,17 @@ export const WithText = {
|
||||
},
|
||||
};
|
||||
|
||||
export const HiddenLabel = {
|
||||
render: Template,
|
||||
|
||||
args: {
|
||||
label: "Select a city",
|
||||
hideLabel: true,
|
||||
options: OPTIONS,
|
||||
defaultValue: OPTIONS[4].value,
|
||||
},
|
||||
};
|
||||
|
||||
export const Controlled = () => {
|
||||
const [value, setValue] = useState(OPTIONS[8].value);
|
||||
return (
|
||||
|
||||
Reference in New Issue
Block a user