Skip to content

Commit

Permalink
the one that deprecates the phase variant of the banner (#1465)
Browse files Browse the repository at this point in the history
* deprecates the phase variant

* Typo

* Typo

* comments out the loud heading in the  nunjucks file

Co-authored-by: Ken Hawkins <khawkins98@gmail.com>
  • Loading branch information
Stuart Robson and khawkins98 committed Mar 31, 2021
1 parent 596050e commit 9f61cef
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 20 deletions.
4 changes: 4 additions & 0 deletions components/vf-banner/CHANGELOG.md
@@ -1,3 +1,7 @@
### 1.7.2

* adds deprecation notices around the `--phase` variant.

### 1.7.1

* changes any `set-` style functions to cleaner version
Expand Down
2 changes: 2 additions & 0 deletions components/vf-banner/vf-banner--inline.njk
@@ -1,3 +1,5 @@
<!-- <h2>This component has been <span style="color: rgb(228, 0, 70);">deprecated</span>. Please use the <a class="vf-link" href="./vf-banner--info/"new</a> component.</h2> in the README.md file. -->

<div class="vf-banner vf-banner--phase">
<div class="vf-banner__content">
<p class="vf-banner__text">This is a new web page. <a href="{{ vf-banner--inline_href }}" class="vf-link">Complete our quick survey</a> to help us make it better.</p>
Expand Down
40 changes: 21 additions & 19 deletions components/vf-banner/vf-banner--phase.scss
@@ -1,28 +1,30 @@
.vf-banner--phase {
background-color: $vf-phase-banner-color--background;
html:not(.vf-disable-deprecated) {
@warn 'This variant has been deprecated, please use the --notice variant of `vf-banner';

margin: 16px 0;
.vf-banner--phase {
background-color: $vf-phase-banner-color--background;

.vf-banner__text,
[class*='vf-text'] { // as of 1.0.4 use of vf-text is not recommended and is subject to future removal
color: $vf-phase-banner-color--text;
margin: 0; // makes the text have no margin so the parent component defines the spacing
margin: 16px 0;

& .vf-banner__link,
& .vf-link {
color: $vf-banner-color--link;
.vf-banner__text,
[class*='vf-text'] { // as of 1.0.4 use of vf-text is not recommended and is subject to future removal
color: $vf-phase-banner-color--text;
margin: 0; // makes the text have no margin so the parent component defines the spacing

& .vf-banner__link,
& .vf-link {
color: $vf-banner-color--link;
}
}
}

.vf-banner__content {
display: flex;
}
.vf-banner__content {
display: flex;
}

.vf-button {
@media (min-width: $vf-breakpoint--lg) {
margin-left: auto;
.vf-button {
@media (min-width: $vf-breakpoint--lg) {
margin-left: auto;
}
}
}


}
6 changes: 5 additions & 1 deletion components/vf-banner/vf-banner.config.yml
Expand Up @@ -32,7 +32,11 @@ variants:
banner__success: true
banner__dismissable: true
banner__message: Congratulations! You have made something <a class="vf-banner__link" href="JavaScript:Void(0);">awesome</a>!

- name: phase
hidden: true
status: deprecated
context:
component-type: deprecated
- name: default
hidden: true
- name: inline
Expand Down

0 comments on commit 9f61cef

Please sign in to comment.