grafana/ui: Do not wrap words inside RadioButton (#35654)

pull/35760/head
Alex Khomenko 4 years ago committed by GitHub
parent 6b786e7f68
commit e5e93134cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 8
      packages/grafana-ui/src/components/Forms/RadioButtonGroup/RadioButton.tsx

@ -1,7 +1,7 @@
import React from 'react';
import { useTheme2, stylesFactory } from '../../../themes';
import { GrafanaTheme2 } from '@grafana/data';
import { css, cx } from '@emotion/css';
import { css } from '@emotion/css';
import { getPropertiesForButtonSize } from '../commonStyles';
import { getFocusStyles, getMouseFocusStyles } from '../../../themes/mixins';
@ -36,14 +36,14 @@ export const RadioButton: React.FC<RadioButtonProps> = ({
<>
<input
type="radio"
className={cx(styles.radio)}
className={styles.radio}
onChange={onChange}
disabled={disabled}
id={id}
checked={active}
name={name}
/>
<label className={cx(styles.radioLabel)} htmlFor={id} title={description}>
<label className={styles.radioLabel} htmlFor={id} title={description}>
{children}
</label>
</>
@ -83,7 +83,6 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme2, size: RadioBut
}
&:disabled + label {
cursor: default;
color: ${theme.colors.text.disabled};
cursor: not-allowed;
}
@ -104,6 +103,7 @@ const getRadioButtonStyles = stylesFactory((theme: GrafanaTheme2, size: RadioBut
flex: ${fullWidth ? `1 0 0` : 'none'};
text-align: center;
user-select: none;
white-space: nowrap;
&:hover {
color: ${textColorHover};

Loading…
Cancel
Save