Skip to content

Commit

Permalink
updates tests, removes docs header image
Browse files Browse the repository at this point in the history
  • Loading branch information
mperrotti committed Feb 28, 2022
1 parent 705f90d commit 8d09179
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
import React from 'react'
import Label from '../Label_deprecated'
import {render, behavesAsComponent, checkExports} from '../utils/testing'
import Label from '../../deprecated/Label'
import {render, behavesAsComponent, checkExports} from '../../utils/testing'
import {render as HTMLRender, cleanup} from '@testing-library/react'
import {axe, toHaveNoViolations} from 'jest-axe'
import 'babel-polyfill'
expect.extend(toHaveNoViolations)

describe('Label_deprecated', () => {
describe('Label', () => {
behavesAsComponent({Component: Label})

checkExports('Label_deprecated', {
checkExports('deprecated/Label', {
default: Label
})

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import React from 'react'
import Label from '../Label_deprecated'
import Label from '../deprecated/Label'

export function shouldAcceptCallWithNoProps() {
return <Label />
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
// Jest Snapshot v1, https://goo.gl/fbAQLP

exports[`Label_deprecated renders consistently 1`] = `
exports[`Label renders consistently 1`] = `
.c0 {
display: inline-block;
font-weight: 500;
Expand All @@ -22,7 +22,7 @@ exports[`Label_deprecated renders consistently 1`] = `
/>
`;

exports[`Label_deprecated respects the "outline" prop 1`] = `
exports[`Label respects the "outline" prop 1`] = `
.c0 {
display: inline-block;
font-weight: 500;
Expand Down Expand Up @@ -50,7 +50,7 @@ exports[`Label_deprecated respects the "outline" prop 1`] = `
/>
`;

exports[`Label_deprecated respects the "variant" prop 1`] = `
exports[`Label respects the "variant" prop 1`] = `
.c0 {
display: inline-block;
font-weight: 500;
Expand Down
6 changes: 3 additions & 3 deletions src/Label_deprecated.tsx → src/deprecated/Label.tsx
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import styled, {css} from 'styled-components'
import {borderColor, BorderColorProps, variant} from 'styled-system'
import {get} from './constants'
import sx, {SxProp} from './sx'
import {ComponentProps} from './utils/types'
import {get} from '../constants'
import sx, {SxProp} from '../sx'
import {ComponentProps} from '../utils/types'

const outlineStyles = css`
margin-top: -1px; // offsets the 1px border
Expand Down
4 changes: 2 additions & 2 deletions src/deprecated/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,8 @@ export type {
} from '../Dropdown'
export {default as FormGroup} from '../FormGroup'
export type {FormGroupProps, FormGroupLabelProps} from '../FormGroup'
export {default as Label} from '../Label_deprecated'
export type {LabelProps} from '../Label_deprecated'
export {default as Label} from './Label'
export type {LabelProps} from './Label'
export {default as SelectMenu} from '../SelectMenu'
export type {
SelectMenuProps,
Expand Down

0 comments on commit 8d09179

Please sign in to comment.