1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-01-20 00:08:02 +01:00

feat: wrap buttons in a fieldset and add an explanatory legend. (#6289)

This makes it more obvious to everyone what the buttons do.
This commit is contained in:
Thomas Heartman 2024-02-21 12:15:02 +08:00 committed by GitHub
parent e96f0c22af
commit ddae97080d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -40,7 +40,16 @@ const EnvironmentSelectionContainer = styled('div')(({ theme }) => ({
outlineOffset: theme.spacing(0.5),
},
input: {
fieldset: {
border: 'none',
padding: 0,
margin: 0,
},
legend: {
marginBlockEnd: theme.spacing(3),
},
'.visually-hidden': {
border: 0,
clip: 'rect(0 0 0 0)',
height: 'auto',
@ -99,21 +108,29 @@ export const ConnectedInstances = () => {
return (
<Container>
<EnvironmentSelectionContainer>
{allEnvironmentsSorted.map((env) => {
return (
<label key={env}>
{env}
<input
defaultChecked={currentEnvironment === env}
type='radio'
name='active-environment'
onClick={() => {
setCurrentEnvironment(env);
}}
/>
</label>
);
})}
<fieldset>
<legend>
Select which environment to display data for. Only
environments that have received traffic for this
application will be shown here.
</legend>
{allEnvironmentsSorted.map((env) => {
return (
<label key={env}>
{env}
<input
defaultChecked={currentEnvironment === env}
className='visually-hidden'
type='radio'
name='active-environment'
onClick={() => {
setCurrentEnvironment(env);
}}
/>
</label>
);
})}
</fieldset>
</EnvironmentSelectionContainer>
<ConnectedInstancesTable
loading={false}