Skip to content

Commit 8deda76

Browse files
committed
feat: rename icon with all the primary icons to "IconPrimary" resp. "icon-primary"
1 parent 46bbb0d commit 8deda76

32 files changed

Lines changed: 46 additions & 55 deletions

File tree

packages/dnb-design-system-portal/src/pages/icons/primary.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ import Icons from "Parts/icons/ListAllIcons";
1111

1212
The Primary Icons are included in the [UI Library](/uilib) and also shipped bundled as an [UMD Package](https://unpkg.com/dnb-ui-lib@latest/umd/dnb-ui-lib-icons.min.js).
1313

14-
Primary Icons an easily be included, for instance, in [Buttons](/uilib/components/button). They are integrated by using the `<IconWithAllIcons />` Component.
14+
Primary Icons an easily be included, for instance, in [Buttons](/uilib/components/button). They are integrated by using the `<IconPrimary />` Component.
1515

1616
#### A list of all Primary Icons
1717

packages/dnb-design-system-portal/src/pages/uilib/usage/first-steps/react.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ draft: false
55
order: 5
66
---
77

8-
import { Button, IconWithAllIcons } from 'dnb-ui-lib/src'
8+
import { Button, IconPrimary } from 'dnb-ui-lib/src'
99
import { ButtonEventExample } from 'Pages/uilib/usage/first-steps/examples/react-examples'
1010

1111
# React JS for the web
@@ -27,15 +27,15 @@ The most basic way to use the `dnb-ui-lib` is like this:
2727
```jsx
2828
<Button variant="secondary" text="Secondary Button" size="large" icon="chevron-right_medium" />
2929
<Button variant="secondary" size="large">
30-
<IconWithAllIcons icon="chevron-right_medium" size="large" />
30+
<IconPrimary icon="chevron-right_medium" size="large" />
3131
</Button>
3232
<Button icon="chevron-right_medium" icon_size="large" size="large" />
3333
```
3434

3535
<div className="demo-box">
3636
<Button variant="secondary" text="Secondary Button" size="large" icon="chevron-right_medium" />
3737
<Button variant="secondary" size="large">
38-
<IconWithAllIcons icon="chevron-right_medium" size="large" />
38+
<IconPrimary icon="chevron-right_medium" size="large" />
3939
</Button>
4040
<Button icon="chevron-right_medium" icon_size="large" size="large" />
4141
</div>
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
<IconWithAllIcons icon="question" />
2-
<IconWithAllIcons icon="chevron_right_medium" />
1+
<IconPrimary icon="question" />
2+
<IconPrimary icon="chevron_right_medium" />
33
<Icon icon={Bell} size="32" />

packages/dnb-design-system-portal/src/uilib/performance-test/PerformanceTest.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ import 'dnb-ui-lib/src/style' // import both all components and the default them
1515
import dnb, {
1616
Button,
1717
Input,
18-
IconWithAllIcons as Icon,
18+
IconPrimary as Icon,
1919
Switch,
2020
FormLabel
2121
} from 'dnb-ui-lib/src'
@@ -338,7 +338,7 @@ class InputTest extends Component {
338338

339339
const IconWrap = ({ webComponentsEnabled, ...props }) =>
340340
webComponentsEnabled ? (
341-
<dnb-icon-with-all-icons {...props} />
341+
<dnb-icon-primary {...props} />
342342
) : (
343343
<Icon {...props} />
344344
)

packages/dnb-design-system-portal/src/uilib/scripts/makeDemosFactory.js

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,7 @@ import runFactory from './tasks/makerFactory'
1010
import processAllPartsFile from './tasks/processAllPartsFile'
1111

1212
if (require.main === module && process.env.NODE_ENV !== 'test') {
13-
const ignoreUiLibList = [
14-
'web-components',
15-
'style',
16-
'icon-with-all-icons'
17-
]
13+
const ignoreUiLibList = ['web-components', 'style', 'icon-primary']
1814
const keepFiles = [] //'!**/footer/*'
1915
const autoAdvice = `
2016
ATTENTION: This file is auto generated by using "makeDemosFactory".

packages/dnb-ui-lib/src/components/button/Button.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
import React, { PureComponent } from 'react'
77
import PropTypes from 'prop-types'
88
import classnames from 'classnames'
9-
import Icon from '../icon/IconWithAllIcons'
9+
import Icon from '../icon/IconPrimary'
1010
import {
1111
registerElement,
1212
validateDOMAttributes,

packages/dnb-ui-lib/src/components/button/__tests__/__snapshots__/Button.test.js.snap

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ exports[`Button component have to match default button snapshot 1`] = `
5757
>
5858
text
5959
</span>
60-
<IconWithAllIcons
60+
<IconPrimary
6161
alt="This is a button title"
6262
area_hidden={true}
6363
attributes={null}
@@ -89,7 +89,7 @@ exports[`Button component have to match default button snapshot 1`] = `
8989
</svg>
9090
</question>
9191
</span>
92-
</IconWithAllIcons>
92+
</IconPrimary>
9393
</Content>
9494
</button>
9595
</Button>
@@ -153,7 +153,7 @@ exports[`Button component have to match href="..." snapshot 1`] = `
153153
>
154154
text
155155
</span>
156-
<IconWithAllIcons
156+
<IconPrimary
157157
alt="This is a button title"
158158
area_hidden={true}
159159
attributes={null}
@@ -185,7 +185,7 @@ exports[`Button component have to match href="..." snapshot 1`] = `
185185
</svg>
186186
</question>
187187
</span>
188-
</IconWithAllIcons>
188+
</IconPrimary>
189189
</Content>
190190
</a>
191191
</Button>

packages/dnb-ui-lib/src/components/dropdown/Dropdown.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ import {
1414
dispatchCustomElementEvent
1515
} from '../../shared/component-helper'
1616
// import './style/dnb-dropdown.scss' // no good solution to import the style here
17-
import Icon from '../icon/IconWithAllIcons'
17+
import Icon from '../icon/IconPrimary'
1818

1919
const renderProps = {
2020
on_show: null,

packages/dnb-ui-lib/src/components/dropdown/__tests__/__snapshots__/Dropdown.test.js.snap

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ exports[`Dropdown component have to match snapshot 1`] = `
3535
<span
3636
className="dnb-dropdown__icon icon-icon"
3737
>
38-
<IconWithAllIcons
38+
<IconPrimary
3939
alt={null}
4040
area_hidden={false}
4141
attributes={null}

packages/dnb-ui-lib/src/components/icon-with-all-icons/IconWithAllIcons.js renamed to packages/dnb-ui-lib/src/components/icon-primary/IconPrimary.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
*
44
*/
55

6-
import web from '../icon/IconWithAllIcons'
6+
import web from '../icon/IconPrimary'
77

88
export { web }
99
export default web

0 commit comments

Comments
 (0)