Skip to content

Commit

Permalink
Updating consuming example to show calc()
Browse files Browse the repository at this point in the history
  • Loading branch information
cchaos committed Mar 8, 2021
1 parent 60ef501 commit 88709ac
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src-docs/src/views/theme/consuming.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from 'react';
import { EuiSpacer } from '../../../../src/components/spacer';
import { EuiIcon } from '../../../../src/components/icon';
import { EuiCode } from '../../../../src/components/code';
import { useEuiTheme } from '../../../../src/services';

export default () => {
Expand All @@ -19,10 +20,12 @@ export default () => {
<div
css={{
background: theme.colors.euiColorLightShade,
padding: theme.sizes.euiSizeXL,
padding: `calc(${theme.sizes.euiSize} * 2)`,
}}>
<p>
The padding of this box is passed as a raw unit translated to pixels
The padding of this box is created using <EuiCode>calc()</EuiCode>{' '}
because EUI&apos;s theme sizes are string pixel values that are
calculated off the theme&apos;s <EuiCode>base</EuiCode>
</p>
</div>
</div>
Expand Down

0 comments on commit 88709ac

Please sign in to comment.