Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Next into master #922

Merged
merged 4 commits into from
Aug 27, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix: id:54692 banner component styling update
  • Loading branch information
Farhan-emgage committed Aug 26, 2021
commit 12a5411b06bc09c2333d9740716797a44d47b20b
12 changes: 4 additions & 8 deletions src/components/Banner/Banner.scss
Original file line number Diff line number Diff line change
@@ -10,18 +10,15 @@
//@import '../../../themes/Delicious/Button.scss';


$accent-height: 4px;
$accent-height: 1px;
$dismiss-size: rem(16px);
$ribbon-flex-basis: rem(32px);
$secondary-action-vertical-padding: 0.5 * (control-height() - line-height(body));
$secondary-action-horizontal-padding: 1.5 * spacing(tightest);

@mixin banner-colors($highlight, $background) {
background-color: $background;
box-shadow:
inset $accent-height 0 0 0 $highlight,
inset shadow(transparent),
shadow();
border: 1px solid $highlight;

&:focus {
box-shadow:
@@ -36,7 +33,7 @@ $secondary-action-horizontal-padding: 1.5 * spacing(tightest);
position: relative;
display: flex;
padding: spacing();
border-radius: 0 0 border-radius() border-radius();
border-radius: border-radius(larger);
transition: box-shadow duration() easing();

+ .Banner {
@@ -70,7 +67,7 @@ $secondary-action-horizontal-padding: 1.5 * spacing(tightest);

.ribbon {
flex: 0 0 $ribbon-flex-basis;
margin-right: spacing();
margin-right: spacing(tightest);
}

.heading {
@@ -167,4 +164,3 @@ $secondary-action-horizontal-padding: 1.5 * spacing(tightest);
.bannerBox {
display: flex;
}

13 changes: 8 additions & 5 deletions src/components/Banner/Banner.tsx
Original file line number Diff line number Diff line change
@@ -17,6 +17,7 @@ import flagSvg from './icons/flag.svg';
import circleAlertSvg from './icons/circle-alert.svg';
import circleBarredSvg from './icons/circle-barred.svg';
import confettiSvg from './icons/confetti.svg';
import BodyText from '../BodyText';

export type Status = 'success' | 'info' | 'warning' | 'critical';

@@ -104,9 +105,11 @@ const banner = ({
headingMarkup = (
<div className={theme.heading} id={headingID}>
<Heading
element="h6"
element="h4"
componentClass={baseTheme.bannerHading}
theme={theme}>
theme={theme}
headingSize="h4"
>
{componentTitle}
</Heading>
</div>
@@ -118,9 +121,9 @@ const banner = ({
return (
<div key={`option_${index}`} className={baseTheme.bannerBox}>
<Icon source = {item.icon as keyof typeof IconList} componentColor = {item.componentColor ? item.componentColor as IconColor : undefined} />
<p className={baseTheme.bannerContent}>
<BodyText element="p" componentClass={baseTheme.bannerContent}>
{item.text}
</p>
</BodyText>
</div>
);
});
@@ -157,7 +160,7 @@ const banner = ({
const dismissButton = onDismiss
? (
<div className={theme.dismiss}>
<Button plain icon="cancelSmall" accessibilityLabel="Dismiss notification" onClick={onDismiss} theme={theme} />
<Button plain icon="cancelSmall" accessibilityLabel="Dismiss notification" onClick={onDismiss} theme={theme} title="Dismiss notification"/>
</div>
)
: null;
2 changes: 1 addition & 1 deletion src/components/Table/Table.tsx
Original file line number Diff line number Diff line change
@@ -319,7 +319,7 @@ class Table extends React.PureComponent<Props, State> {
<NoData iconSource="search" label={noDataInSearchLabel}></NoData>
);
}
return (
return (
<NoData iconSource="inbox" label={noDataLabel}></NoData>
);

3 changes: 2 additions & 1 deletion src/styles/foundation/border-radius.scss
Original file line number Diff line number Diff line change
@@ -3,7 +3,8 @@

$border-radius-data: (
base: 3px,
large: 6px
large: 6px,
larger: 8px
);