Skip to content

Instantly share code, notes, and snippets.

View jepser's full-sized avatar

Jepser Bernardino jepser

View GitHub Profile
@jepser
jepser / SuperComponent.styled.ts
Created November 20, 2020 18:31
Components convention
import styled from 'styled-components';
export const Root = styled.div``;
export const Label = styled.div``;
export const Title = styled.span``;
@jepser
jepser / example.test.jsx
Created November 19, 2020 22:59
Talo example test
import { getSuperThing } from '~/api'
const Talo = () => {
const [data, setData] = useState(null)
useEffect(() => {
getSuperThing().then(setData)
}, [])
if(!data) return null
@jepser
jepser / adobe-xd-prototype-data.json
Created July 15, 2020 15:48
Prototype data on shared prototype
{
"manifest": {
"shouldLoadUnifiedApp": true,
"allowComments": "true",
"shareModeViewMode": "ShareModeViewModeDesign",
"id": "4c2c0af2-5daf-4c97-9b8b-8f41bd3624ab",
"name": "Untitled-1",
"thumbnail": {
"id": "dbe95ef9-1b47-4ab2-88c9-d820937c4dba",
"path": "homeThumbnail.png",
@jepser
jepser / adobe-xd-artboard-response.json
Last active May 27, 2022 08:40
API response for Adobe XD artboard
{
"version": "1.5.0",
"children": [
{
"type": "artboard",
"meta": {
"ux": {
"nameL10N": "SHAPE_RECTANGLE",
"bounds": {
"x": 0,
@jepser
jepser / adobe-xd-response.json
Last active July 15, 2020 15:20
Response from scaffold API call for Adobe XD
{
"version": "0.24",
"homeArtboard": "2bcde2bc-09b1-4dc4-88af-7dc0017f2ab8",
"interactions": {
"70f72742-b83e-4412-a7b8-1bff98973729": [
{
"properties": {
"transition": "dissolve",
"duration": 0.3,
"easing": "ease-out",
@jepser
jepser / README.md
Created April 17, 2020 11:07
Product item on react emoji restaurant exercise

Remember:

  1. In App create a method to handle the action that comes from ProductItem, and set it as a prop
  2. Connect ProductItem form submission method, with a prop that comes from App.
  3. In App, in the method that you created update the state adding the item to the cart
  4. Pass the cart items information (remember that we need name, quantity and subtotal) to Cart component
  5. In cart loop through the items :)
@jepser
jepser / get-values-method.js
Created April 5, 2020 20:41
Tree - DFS preorder
getValues() {
let result = [];
function traverse(node) {
result.push(node.value);
if (node.left) {
traverse(node.left);
}
if (node.right) {
@jepser
jepser / UserView.Vue
Created April 2, 2020 19:01
UserView - Vue
<template>
<div>
<div>My portfolio</div>
<div v-if="featureItem" class="feature-item">
<h4>{{featureItem.title}}</h4>
<p>{{featureItem.description}}</p>
<img :src="featureItem.image" />
</div>
<ul class="image-wrapper">
<li
@jepser
jepser / app.vue
Created April 2, 2020 17:46
template with styles
<template>
<div class="wrapper">
<h3 class="title">Add new project</h3>
<div class="form-section">
<div class="form-input">
<label for="title">Project title</label>
<input class="input-field" name="title" v-model="title" />
</div>
<div class="form-input form-input-last">
<label for="image">Image URL</label>
const baseStyles = ({ top, left, right, bottom }) => css`
margin-top: ${top ? unitizedPx(top) : null};
margin-right: ${right ? unitizedPx(right) : null};
margin-bottom: ${bottom ? unitizedPx(bottom) : null};
margin-left: ${left ? unitizedPx(left) : null};
`;
const responsiveStyles = generateResponsiveStyles(baseStyles);
export const Root = styled.div`