Skip to content

Commit

Permalink
change(copyright): implementation to add classes on content sections
Browse files Browse the repository at this point in the history
- also remove inverted segment when we use the theming colors
  • Loading branch information
ichim-david committed Dec 2, 2022
1 parent bd7b7b8 commit e10bde6
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 37 deletions.
12 changes: 10 additions & 2 deletions src/ui/Copyright/Copyright.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,15 @@ function Copyright({ children, ...rest }) {
);
}

Copyright.Icon = ({ children, ...rest }) => <span {...rest}>{children}</span>;
Copyright.Icon = ({ children, ...rest }) => (
<span {...rest} className={'icon-wrapper'}>
{children}
</span>
);

Copyright.Text = ({ children, ...rest }) => <span {...rest}>{children}</span>;
Copyright.Text = ({ children, ...rest }) => (
<span {...rest} className={'content'}>
{children}
</span>
);
export default Copyright;
2 changes: 1 addition & 1 deletion src/ui/Copyright/Copyright.stories.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ export default {

export const Default = (args) => (
<Container>
<Segment inverted>
<Segment className={args.colorVariant === 'default' ? 'inverted' : ''}>
<Copyright
copyrightPosition={args.copyrightPosition}
colorVariant={args.colorVariant}
Expand Down
62 changes: 28 additions & 34 deletions theme/themes/eea/extras/copyright.less
Original file line number Diff line number Diff line change
@@ -1,34 +1,28 @@
@type: 'extra';
@element: 'copyright';

@import (multiple) '../../theme.config';

/*-------------------
Copyright
--------------------*/

.eea.copyright {
width: @copyrightWidth;

.wrapper {
display: flex;
color: @copyrightContentColor;
}
}

.eea.copyright.left .wrapper {
justify-content: flex-start;
}

.eea.copyright.right .wrapper {
justify-content: flex-end;
}

.eea.copyright .wrapper span {
font-size: @copyrightContentFontSize;
padding-right: @copyrightContentPaddingRight;
}

.eea.copyright .wrapper i.icon {
margin: 0; // override default
}
@type: 'extra';
@element: 'copyright';

@import (multiple) '../../theme.config';

/*-------------------
Copyright
--------------------*/

.eea.copyright {
width: @copyrightWidth;

.wrapper {
display: flex;
color: @copyrightContentColor;
font-size: @copyrightContentFontSize;
gap: @copyrightContentPaddingRight;
}
&.left .wrapper {
justify-content: flex-start;
}
&.right .wrapper {
justify-content: flex-end;
}
.icon {
margin: 0; // override default
}
}

0 comments on commit e10bde6

Please sign in to comment.