mirror of
https://github.com/elastic/kibana.git
synced 2025-06-27 18:51:07 -04:00
[File Upload Component] Use forms.maxWidth styling from euiTheme (#205947)
## Summary Follows https://github.com/elastic/eui/pull/8221
This commit is contained in:
parent
d6e28f766a
commit
63c0d185ef
1 changed files with 1 additions and 5 deletions
|
@ -19,7 +19,6 @@ import {
|
||||||
EuiText,
|
EuiText,
|
||||||
useEuiTheme,
|
useEuiTheme,
|
||||||
useGeneratedHtmlId,
|
useGeneratedHtmlId,
|
||||||
mathWithUnits,
|
|
||||||
} from '@elastic/eui';
|
} from '@elastic/eui';
|
||||||
import type {
|
import type {
|
||||||
EuiFilePickerClass,
|
EuiFilePickerClass,
|
||||||
|
@ -80,15 +79,12 @@ export const FileUpload = React.forwardRef<EuiFilePickerClass, Props>(
|
||||||
const id = useGeneratedHtmlId({ prefix: 'filesFileUpload' });
|
const id = useGeneratedHtmlId({ prefix: 'filesFileUpload' });
|
||||||
const errorId = `${id}_error`;
|
const errorId = `${id}_error`;
|
||||||
|
|
||||||
// FIXME: add a token for this on euiTheme.components. https://github.com/elastic/eui/issues/8217
|
|
||||||
const formMaxWidth = mathWithUnits(euiTheme.size.base, (x) => x * 25);
|
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
data-test-subj="filesFileUpload"
|
data-test-subj="filesFileUpload"
|
||||||
css={[
|
css={[
|
||||||
css`
|
css`
|
||||||
max-width: ${fullWidth ? '100%' : formMaxWidth};
|
max-width: ${fullWidth ? '100%' : euiTheme.components.forms.maxWidth};
|
||||||
`,
|
`,
|
||||||
fullWidth ? styles.fullWidth : undefined,
|
fullWidth ? styles.fullWidth : undefined,
|
||||||
compressed ? styles.horizontalContainer : undefined,
|
compressed ? styles.horizontalContainer : undefined,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue