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), outlineOffset: theme.spacing(0.5),
}, },
input: { fieldset: {
border: 'none',
padding: 0,
margin: 0,
},
legend: {
marginBlockEnd: theme.spacing(3),
},
'.visually-hidden': {
border: 0, border: 0,
clip: 'rect(0 0 0 0)', clip: 'rect(0 0 0 0)',
height: 'auto', height: 'auto',
@ -99,12 +108,19 @@ export const ConnectedInstances = () => {
return ( return (
<Container> <Container>
<EnvironmentSelectionContainer> <EnvironmentSelectionContainer>
<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) => { {allEnvironmentsSorted.map((env) => {
return ( return (
<label key={env}> <label key={env}>
{env} {env}
<input <input
defaultChecked={currentEnvironment === env} defaultChecked={currentEnvironment === env}
className='visually-hidden'
type='radio' type='radio'
name='active-environment' name='active-environment'
onClick={() => { onClick={() => {
@ -114,6 +130,7 @@ export const ConnectedInstances = () => {
</label> </label>
); );
})} })}
</fieldset>
</EnvironmentSelectionContainer> </EnvironmentSelectionContainer>
<ConnectedInstancesTable <ConnectedInstancesTable
loading={false} loading={false}