File tree Expand file tree Collapse file tree 3 files changed +15
-11
lines changed
packages/notifications/src Expand file tree Collapse file tree 3 files changed +15
-11
lines changed Original file line number Diff line number Diff line change @@ -12,9 +12,11 @@ import { StyledWell } from '../styled';
1212import { Title } from './content/Title' ;
1313import { Paragraph } from './content/Paragraph' ;
1414
15- export const WellComponent = React . forwardRef < HTMLDivElement , IWellProps > ( ( props , ref ) => (
16- < StyledWell ref = { ref } { ...props } />
17- ) ) ;
15+ export const WellComponent = React . forwardRef < HTMLDivElement , IWellProps > (
16+ ( { isFloating, isRecessed, ...props } , ref ) => (
17+ < StyledWell ref = { ref } $isFloating = { isFloating } $isRecessed = { isRecessed } { ...props } />
18+ )
19+ ) ;
1820
1921WellComponent . displayName = 'Well' ;
2022
Original file line number Diff line number Diff line change 77
88import React from 'react' ;
99import { render , renderRtl } from 'garden-test-utils' ;
10- import { PALETTE_V8 } from '@zendeskgarden/react-theming' ;
10+ import { PALETTE } from '@zendeskgarden/react-theming' ;
1111import { StyledWell } from '../styled' ;
1212
1313describe ( 'StyledWell' , ( ) => {
@@ -30,8 +30,8 @@ describe('StyledWell', () => {
3030 } ) ;
3131
3232 it ( 'renders recessed styling correctly' , ( ) => {
33- const { container } = render ( < StyledWell isRecessed /> ) ;
33+ const { container } = render ( < StyledWell $ isRecessed /> ) ;
3434
35- expect ( container . firstChild ) . toHaveStyleRule ( 'background-color' , PALETTE_V8 . grey [ 100 ] ) ;
35+ expect ( container . firstChild ) . toHaveStyleRule ( 'background-color' , PALETTE . grey [ 100 ] ) ;
3636 } ) ;
3737} ) ;
Original file line number Diff line number Diff line change 66 */
77
88import styled from 'styled-components' ;
9- import { getColorV8 , retrieveComponentStyles , DEFAULT_THEME } from '@zendeskgarden/react-theming' ;
9+ import { retrieveComponentStyles , DEFAULT_THEME , getColor } from '@zendeskgarden/react-theming' ;
1010import { StyledBase } from './StyledBase' ;
1111
1212const COMPONENT_ID = 'notifications.well' ;
1313
1414export interface IStyledWellProps {
15- isRecessed ?: boolean ;
15+ $ isRecessed ?: boolean ;
1616}
1717
1818/**
@@ -22,9 +22,11 @@ export const StyledWell = styled(StyledBase).attrs({
2222 'data-garden-id' : COMPONENT_ID ,
2323 'data-garden-version' : PACKAGE_VERSION
2424} ) < IStyledWellProps > `
25- background-color: ${ props => props . isRecessed && getColorV8 ( 'neutralHue' , 100 , props . theme ) } ;
26- color: ${ props => getColorV8 ( 'neutralHue' , 600 , props . theme ) }
27- ${ props => retrieveComponentStyles ( COMPONENT_ID , props ) } ;
25+ background-color: ${ p =>
26+ p . $isRecessed && getColor ( { variable : 'background.recessed' , theme : p . theme } ) } ;
27+ color: ${ p => getColor ( { variable : 'foreground.subtle' , theme : p . theme } ) } ;
28+
29+ ${ p => retrieveComponentStyles ( COMPONENT_ID , p ) } ;
2830` ;
2931
3032StyledWell . defaultProps = {
You can’t perform that action at this time.
0 commit comments