diff --git a/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js b/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js index 817fee83ec..65c9689096 100644 --- a/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js +++ b/packages/core/content-type-builder/admin/src/components/AttributeIcon/index.js @@ -53,9 +53,10 @@ const iconByTypes = { }; const IconBox = styled(Box)` - width: ${pxToRem(32)}; - height: ${pxToRem(24)}; - box-sizing: content-box; + svg { + height: 100%; + width: 100%; + } `; const AttributeIcon = ({ type, customField, ...rest }) => { @@ -75,7 +76,11 @@ const AttributeIcon = ({ type, customField, ...rest }) => { return null; } - return ; + return ( + + + + ); }; AttributeIcon.defaultProps = { diff --git a/packages/core/content-type-builder/admin/src/components/AttributeOptions/tests/__snapshots__/index.test.js.snap b/packages/core/content-type-builder/admin/src/components/AttributeOptions/tests/__snapshots__/index.test.js.snap index a9cf4266ef..09a8bc6354 100644 --- a/packages/core/content-type-builder/admin/src/components/AttributeOptions/tests/__snapshots__/index.test.js.snap +++ b/packages/core/content-type-builder/admin/src/components/AttributeOptions/tests/__snapshots__/index.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[` renders and matches the snapshot 1`] = ` -.c26 { +.c27 { border: 0; -webkit-clip: rect(0 0 0 0); clip: rect(0 0 0 0); @@ -39,11 +39,19 @@ exports[` renders and matches the snapshot 1`] = ` border-radius: 4px; } -.c22 { +.c21 { + width: 2rem; + height: 1.5rem; + -webkit-flex-shrink: 0; + -ms-flex-negative: 0; + flex-shrink: 0; +} + +.c23 { padding-left: 16px; } -.c25 { +.c26 { padding-bottom: 4px; padding-left: 8px; } @@ -117,14 +125,14 @@ exports[` renders and matches the snapshot 1`] = ` color: #666687; } -.c23 { +.c24 { font-size: 0.875rem; line-height: 1.43; font-weight: 600; color: #32324d; } -.c24 { +.c25 { font-size: 0.75rem; line-height: 1.33; color: #666687; @@ -175,10 +183,9 @@ exports[` renders and matches the snapshot 1`] = ` max-width: 100%; } -.c21 { - width: 2rem; - height: 1.5rem; - box-sizing: content-box; +.c22 svg { + height: 100%; + width: 100%; } .c19 { @@ -305,37 +312,43 @@ exports[` renders and matches the snapshot 1`] = `
- +
text @@ -344,7 +357,7 @@ exports[` renders and matches the snapshot 1`] = ` class="c20" > A type for modeling data @@ -363,7 +376,7 @@ exports[` renders and matches the snapshot 1`] = ` style="height: 100%;" >
categories @@ -1489,7 +1508,7 @@ exports[` renders and matches the snapshot 1`] = ` Relation with   @@ -1508,19 +1527,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
cover @@ -1620,7 +1645,7 @@ exports[` renders and matches the snapshot 1`] = ` Media   @@ -1633,19 +1658,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
images @@ -1745,7 +1776,7 @@ exports[` renders and matches the snapshot 1`] = ` Media   @@ -1758,19 +1789,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
city @@ -1868,7 +1905,7 @@ exports[` renders and matches the snapshot 1`] = ` Text   @@ -1881,19 +1918,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
json @@ -1993,7 +2036,7 @@ exports[` renders and matches the snapshot 1`] = ` JSON   @@ -2006,19 +2049,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
slug @@ -2112,7 +2161,7 @@ exports[` renders and matches the snapshot 1`] = ` UID   @@ -2125,19 +2174,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
notrepeat_req @@ -2241,7 +2296,7 @@ exports[` renders and matches the snapshot 1`] = ` Component   @@ -2254,19 +2309,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
renders and matches the snapshot 1`] = `
renders and matches the snapshot 1`] = ` class="c0 c25" >
@@ -3776,10 +3879,10 @@ exports[` renders and matches the snapshot 1`] = ` style="position: relative;" >
renders and matches the snapshot 1`] = ` class="c0 c29 c9 c30" spacing="4" > - + + + + +
name @@ -3830,7 +3939,7 @@ exports[` renders and matches the snapshot 1`] = `
Text   @@ -3843,19 +3952,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
Email   @@ -3985,19 +4100,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >
Number   @@ -4127,19 +4248,19 @@ exports[` renders and matches the snapshot 1`] = ` role="button" >