mirror of
https://github.com/mastermindzh/rickvanlieshout.com
synced 2025-07-29 13:42:28 +02:00
refactor(starter): upgrade to new version of gatsby
This commit is contained in:
@@ -1,15 +0,0 @@
|
||||
// @flow strict
|
||||
import React from 'react';
|
||||
import styles from './Copyright.module.scss';
|
||||
|
||||
type Props = {
|
||||
copyright: string
|
||||
};
|
||||
|
||||
const Copyright = ({ copyright }: Props) => (
|
||||
<div className={styles['copyright']}>
|
||||
{copyright}
|
||||
</div>
|
||||
);
|
||||
|
||||
export default Copyright;
|
@@ -1,7 +1,9 @@
|
||||
@import '../../../assets/scss/variables';
|
||||
@import '../../../assets/scss/mixins';
|
||||
@use "sass:color";
|
||||
|
||||
@import "../../../assets/scss/variables";
|
||||
@import "../../../assets/scss/mixins";
|
||||
|
||||
.copyright {
|
||||
color: lighten($color-gray, 18%);
|
||||
color: color.adjust($color-gray, 18%);
|
||||
font-size: $typographic-small-font-size;
|
||||
}
|
||||
}
|
||||
|
@@ -1,15 +0,0 @@
|
||||
// @flow strict
|
||||
import React from 'react';
|
||||
import renderer from 'react-test-renderer';
|
||||
import Copyright from './Copyright';
|
||||
|
||||
describe('Copyright', () => {
|
||||
it('renders correctly', () => {
|
||||
const props = {
|
||||
copyright: 'copyright'
|
||||
};
|
||||
|
||||
const tree = renderer.create(<Copyright {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
12
src/components/Sidebar/Copyright/Copyright.test.tsx
Normal file
12
src/components/Sidebar/Copyright/Copyright.test.tsx
Normal file
@@ -0,0 +1,12 @@
|
||||
import React from "react";
|
||||
import renderer from "react-test-renderer";
|
||||
|
||||
import { Copyright } from "@/components/Sidebar/Copyright";
|
||||
|
||||
describe("Copyright", () => {
|
||||
it("renders correctly", () => {
|
||||
const props = { copyright: "copyright" };
|
||||
const tree = renderer.create(<Copyright {...props} />).toJSON();
|
||||
expect(tree).toMatchSnapshot();
|
||||
});
|
||||
});
|
13
src/components/Sidebar/Copyright/Copyright.tsx
Normal file
13
src/components/Sidebar/Copyright/Copyright.tsx
Normal file
@@ -0,0 +1,13 @@
|
||||
import React from "react";
|
||||
|
||||
import styles from "./Copyright.module.scss";
|
||||
|
||||
type Props = {
|
||||
copyright: string;
|
||||
};
|
||||
|
||||
const Copyright = ({ copyright }: Props) => (
|
||||
<div className={styles.copyright}>{copyright}</div>
|
||||
);
|
||||
|
||||
export default Copyright;
|
@@ -1,2 +0,0 @@
|
||||
// @flow strict
|
||||
export { default } from './Copyright';
|
1
src/components/Sidebar/Copyright/index.ts
Normal file
1
src/components/Sidebar/Copyright/index.ts
Normal file
@@ -0,0 +1 @@
|
||||
export { default as Copyright } from "./Copyright";
|
Reference in New Issue
Block a user