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

Rename bx -> cds #73

Merged
merged 3 commits into from
Jun 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
1 change: 0 additions & 1 deletion cookbook/gatsby-browser.js

This file was deleted.

175 changes: 0 additions & 175 deletions cookbook/src/styles/index.scss

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import React from "react";
import Example from "../../../examples/images/sample-logo.jpg";
import Logo from "./Logo";
import settings from "../../core/settings";

export default {
title: "Logo",
Expand Down Expand Up @@ -37,25 +38,25 @@ Large.args = {
export const All = () => {
return (
<div className="spm-custom-component">
<div className="bx--grid">
<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--grid`}>
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<h2>small</h2>
<Logo size="small">
<img src={Example} alt="small logo" />
</Logo>
</div>
</div>
<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<h2>medium</h2>
<Logo size="medium">
<img src={Example} alt="medium logo" />
</Logo>
</div>
</div>
<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<h2>large</h2>
<Logo size="large">
<img src={Example} alt="large logo" />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ describe("Logo tests", () => {
expect(Object.keys(divAtts).length).toBe(3);

expect(logoDiv.at(0).props().className).toBe(
"bx--logo bx--logo--large settings.prefix--logo--extraextra",
`${settings.prefix}--logo ${settings.prefix}--logo--large settings.prefix--logo--extraextra`,
);
expect(logoDiv.at(0).props().id).toBe("logo_123");
// this is the child nodes not an attribute
Expand Down
2 changes: 1 addition & 1 deletion packages/carbon-addons-devenv/src/react/core/settings.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
const settings = {
prefix: "bx",
prefix: "cds",
};

module.exports = settings;
29 changes: 0 additions & 29 deletions packages/carbon-addons-devenv/src/scss/logo.scss

This file was deleted.

25 changes: 0 additions & 25 deletions packages/carbon-addons-devenv/src/scss/personfolio.scss

This file was deleted.

2 changes: 1 addition & 1 deletion packages/carbon-addons-devenv/src/scss/prefix.scss
Original file line number Diff line number Diff line change
@@ -1 +1 @@
$prefix: "bx";
$prefix: "cds";
19 changes: 10 additions & 9 deletions packages/carbon-addons-devenv/stories/PersonFolio.stories.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import React from "react";
import PersonFolio from "../src/react/addons_samples/PersonFolio/PersonFolio";
import settings from "../src/react/core/settings";

// 👇 We create a “template” of how args map to rendering
const Template = (args) => (
Expand Down Expand Up @@ -38,27 +39,27 @@ Senior.args = {
export const PersonFolioStory = () => {
return (
<div className="spm-custom-component">
<div className="bx--grid">
<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--grid`}>
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<PersonFolio firstname="Dave" surname="Bloggs" age="12" />
</div>
</div>

<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<PersonFolio firstname="Mary" surname="Bloggs" age="24" />
</div>
</div>

<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<PersonFolio firstname="Ann" surname="Bloggs" age="47" />
</div>
</div>

<div className="bx--row">
<div className="bx--col">
<div className={`${settings.prefix}--row`}>
<div className={`${settings.prefix}--col`}>
<PersonFolio firstname="Peter" surname="Smith" age="73" />
</div>
</div>
Expand Down
Loading