Skip to content

Commit

Permalink
[opinionated] Rename defaultMaxWidth class modifier
Browse files Browse the repository at this point in the history
- to match `defaultMinWidth` modifier, used in EuiButtonDisplay (elastic#6373)
  • Loading branch information
cee-chen committed Nov 18, 2022
1 parent 334ce8c commit 16ecde8
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ Array [
>
<div
aria-label="aria-label"
class="euiModal euiModal--confirmation testClass1 testClass2 emotion-euiModal-maxWidthDefault-confirmation"
class="euiModal euiModal--confirmation testClass1 testClass2 emotion-euiModal-defaultMaxWidth-confirmation"
data-test-subj="test subject string"
tabindex="0"
>
Expand Down Expand Up @@ -110,7 +110,7 @@ Array [
>
<div
aria-label="aria-label"
class="euiModal euiModal--confirmation testClass1 testClass2 emotion-euiModal-maxWidthDefault-confirmation"
class="euiModal euiModal--confirmation testClass1 testClass2 emotion-euiModal-defaultMaxWidth-confirmation"
data-test-subj="test subject string"
tabindex="0"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/__snapshots__/modal.test.tsx.snap
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ exports[`EuiModal renders 1`] = `
>
<div
aria-label="aria-label"
class="euiModal testClass1 testClass2 emotion-euiModal-maxWidthDefault"
class="euiModal testClass1 testClass2 emotion-euiModal-defaultMaxWidth"
data-test-subj="test subject string"
tabindex="0"
>
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/modal.styles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ export const euiModalStyles = (euiThemeContext: UseEuiTheme) => {
}
`,
// Variants
maxWidthDefault: css`
defaultMaxWidth: css`
max-inline-size: min(
${euiTheme.breakpoint.m}px,
calc(100vw - ${euiTheme.size.base})
Expand Down
2 changes: 1 addition & 1 deletion src/components/modal/modal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ export const EuiModal: FunctionComponent<EuiModalProps> = ({

const euiTheme = useEuiTheme();
const styles = euiModalStyles(euiTheme);
const cssStyles = [styles.euiModal, maxWidth && styles.maxWidthDefault];
const cssStyles = [styles.euiModal, maxWidth && styles.defaultMaxWidth];

const cssCloseIconStyles = [styles.euiModal__closeIcon];

Expand Down

0 comments on commit 16ecde8

Please sign in to comment.