diff --git a/src/components/Banner.tsx b/src/components/Banner.tsx index e17a72d356..fcd64b8fa6 100644 --- a/src/components/Banner.tsx +++ b/src/components/Banner.tsx @@ -172,6 +172,7 @@ const Banner = ({ @@ -197,7 +198,9 @@ const Banner = ({ ) : null} - {children} + + {children} + {actions.map(({ label, ...others }, i) => ( @@ -205,7 +208,8 @@ const Banner = ({ key={/* eslint-disable-line react/no-array-index-key */ i} compact mode="text" - style={styles.button} + style={[styles.button]} + color={theme.colors.primary} {...others} > {label} diff --git a/src/components/__tests__/Banner.test.js b/src/components/__tests__/Banner.test.js index fbb78b4de7..66746bc997 100644 --- a/src/components/__tests__/Banner.test.js +++ b/src/components/__tests__/Banner.test.js @@ -91,3 +91,25 @@ it('renders visible banner, with action buttons and with image', () => { expect(tree).toMatchSnapshot(); }); + +it('render visible banner, with custom theme', () => { + const tree = renderer + .create( + {} }]} + > + Custom theme + + ) + .toJSON(); + + expect(tree).toMatchSnapshot(); +}); diff --git a/src/components/__tests__/__snapshots__/Banner.test.js.snap b/src/components/__tests__/__snapshots__/Banner.test.js.snap index 91dccd28b7..44b6c53883 100644 --- a/src/components/__tests__/__snapshots__/Banner.test.js.snap +++ b/src/components/__tests__/__snapshots__/Banner.test.js.snap @@ -1,5 +1,195 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP +exports[`render visible banner, with custom theme 1`] = ` + + + + + + + Custom theme + + + + + + + + first + + + + + + + + +`; + exports[`renders hidden banner, without action buttons and without image 1`] = `