@veracity/vui 2.22.0 → 2.22.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@veracity/vui",
3
- "version": "2.22.0",
3
+ "version": "2.22.1",
4
4
  "description": "Veracity UI is a React component library crafted for use within Veracity applications and pages. Based on Styled Components and @xstyled.",
5
5
  "module": "./dist/esm/index.js",
6
6
  "main": "./dist/cjs/index.js",
package/src/logo/Logo.tsx CHANGED
@@ -1,5 +1,3 @@
1
- import React from 'react'
2
-
3
1
  import Box from '../box'
4
2
  import { cdnUrl, vui } from '../core'
5
3
  import Svg, { SvgProps } from '../svg'
@@ -8,14 +6,20 @@ import { LogoProps } from './logo.types'
8
6
 
9
7
  const veracityLogo = `${cdnUrl}/common/icons/logos/veracity-logo.svg`
10
8
  const dnvLogo = `${cdnUrl}/common/icons/logos/dnv-logo.svg`
9
+ const veracityLogoWidth = 115
10
+ const dnvLogoWidth = 93.66
11
11
 
12
12
  /** Brand logo. */
13
13
  export const Logo = vui<'div', LogoProps>((props, ref) => {
14
- const { brand, children, className, src, styles, url, ...rest } = props
14
+ const { brand, children, className, src, styles, url, w, ...rest } = props
15
15
 
16
16
  let svgSrc = src
17
+ let width = w
17
18
 
18
- if (!svgSrc) svgSrc = brand === 'dnv' ? dnvLogo : veracityLogo
19
+ if (!svgSrc) {
20
+ svgSrc = brand === 'dnv' ? dnvLogo : veracityLogo
21
+ width = brand === 'dnv' ? dnvLogoWidth : veracityLogoWidth
22
+ }
19
23
 
20
24
  const linkProps = url ? { as: 'a', href: url, outline: 'none', focusRing: 2 } : {}
21
25
 
@@ -27,6 +31,7 @@ export const Logo = vui<'div', LogoProps>((props, ref) => {
27
31
  h={40}
28
32
  mr={2}
29
33
  ref={ref}
34
+ w={width}
30
35
  {...styles?.container}
31
36
  {...linkProps}
32
37
  {...rest}