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

Hxsggsz 35268942 #6

Closed
wants to merge 6 commits into from
Closed

Hxsggsz 35268942 #6

wants to merge 6 commits into from

Conversation

hxsggsz
Copy link
Contributor

@hxsggsz hxsggsz commented Aug 7, 2023

On this pull request i make a toggle social media with a switch component using the checkbox input as a base for it

The toggle social media component

To use this component you need to pass as props the social media name, here is the code example:

import { ToggleSocialMedia } from './components/toggleSocialMedia';

function App() {
  return (
	<ToggleSocialMedia socialMedia="Facebook" />
  );

}
  
export default App;

The final result:

2023-08-07-19-04-12

How to use the switch component on your code:

You will need to pass two props to the component: the checked state as a boolean and the setChecked

here is an example in code how to use it

function App() {
  const [checked, setChecked] = useState(false);

  return (
      <Switch checked={checked} setChecked={setChecked} />
  );

}

  

export default App;

Final result of the switch component

2023-08-07-18-51-24

src/components/toggleSocialMedia/index.tsx Outdated Show resolved Hide resolved
src/styles/Swith.module.scss Outdated Show resolved Hide resolved
src/styles/Swith.module.scss Outdated Show resolved Hide resolved
src/styles/ToggleSocialMedia.module.scss Outdated Show resolved Hide resolved
src/styles/ToggleSocialMedia.module.scss Outdated Show resolved Hide resolved
src/styles/Swith.module.scss Outdated Show resolved Hide resolved
@Alecell
Copy link
Contributor

Alecell commented Aug 8, 2023

Adorei o PR! Vamos tentar seguir mais esse padrão no projeto!

src/components/preview/index.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

@Alecell Alecell left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Um pepino chato é que vc commitou o base.scss na mesma branch e não numa separada, isso é ruim, mas como era só colocar a branch sem mais nada acho que ta safe!

src/App.tsx Show resolved Hide resolved
@hxsggsz hxsggsz changed the base branch from master to develop August 9, 2023 21:50
@hxsggsz hxsggsz self-assigned this Aug 9, 2023
hxsggsz added a commit to hxsggsz/octopost that referenced this pull request Aug 9, 2023
Copy link
Member

@aalmeida00 aalmeida00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Algumas modificações relacionados a styleguide e padrões que vamos adotar.

.github/pull_request_template.md Outdated Show resolved Hide resolved
src/components/preview/index.tsx Outdated Show resolved Hide resolved
src/components/preview/index.tsx Outdated Show resolved Hide resolved
src/components/switch/Switch.tsx Outdated Show resolved Hide resolved
src/components/preview/index.tsx Outdated Show resolved Hide resolved
src/components/toggleSocialMedia/ToggleSocialMedia.tsx Outdated Show resolved Hide resolved
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ué, ta resolved, mas o arquivo ainda ta aqui

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mais um marcado como resolved que não foi feito.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nome da pasta é PascalCase tambem

@@ -0,0 +1,4 @@
export interface ISwitch {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Anota isso no nosso styleguide, com excessão de componentes, todo o resto é export na declaração, salvo excessões!

Comment on lines +31 to +32
right: 0;
left: 50%;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Acho q dava pra melhorar, mas ta bom desse jeito!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mais um marcado como resolved que não foi resolved

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

eu tinha apagado o arquivo mas todo push que eu faço esse arquivo é enviado pra pr junto com o componente de preview da outra pr por algum motivo

hxsggsz added a commit to hxsggsz/octopost that referenced this pull request Aug 10, 2023
@hxsggsz hxsggsz closed this Aug 10, 2023
@hxsggsz hxsggsz deleted the 35268942 branch August 10, 2023 01:48
hxsggsz added a commit that referenced this pull request Aug 10, 2023
hxsggsz added a commit that referenced this pull request Aug 10, 2023
hxsggsz added a commit that referenced this pull request Aug 10, 2023
hxsggsz added a commit that referenced this pull request Aug 10, 2023
hxsggsz added a commit that referenced this pull request Aug 10, 2023
hxsggsz added a commit that referenced this pull request Aug 10, 2023
hxsggsz added a commit that referenced this pull request Aug 10, 2023
Alecell pushed a commit that referenced this pull request Aug 10, 2023
Alecell pushed a commit that referenced this pull request Aug 10, 2023
Alecell pushed a commit that referenced this pull request Aug 10, 2023
Alecell pushed a commit that referenced this pull request Aug 10, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants