Skip to content

Instantly share code, notes, and snippets.

View mariohernandez's full-sized avatar
✌️

Mario Hernandez mariohernandez

✌️
View GitHub Profile
@mariohernandez
mariohernandez / .ddev-docker-compose-patternlab.yaml
Last active June 19, 2020 18:23
patternlab docker-compose*.yaml
# docker-compose.patternlab.com to pass port 3000 inside the container
# to https://<something>.ddev.site:3001
version: '3.6'
services:
web:
ports:
# Expose port 3000 for the patternlab app
- "3001"
environment:
# Override the web container's standard HTTP_EXPOSE and HTTPS_EXPOSE
{
"items": [
{
"title": "Home",
"url": "#",
"in_active_trail": false
},
{
"title": "About Us",
"url": "#",
@mariohernandez
mariohernandez / sdc
Created February 19, 2024 21:13
JSON Notation for SDC
# Everything in this file is optional. Still, the file needs to exist. Adding
# metadata here will improve the DX when using components.
# Note: currently in Drupal 10.1, the schema will fail to validate if
# props section is not present. This may change in a future release.
# This is so your IDE knows about the syntax for fixes and autocomplete.
$schema: https://git.drupalcode.org/project/sdc/-/raw/1.x/src/metadata.schema.json
# The human readable name.
@mariohernandez
mariohernandez / attributes
Created March 21, 2024 17:11
Component wrapper with modifier and attributes
<article class="card{{ modifier ? ' ' ~ modifier }}{{- attributes ? ' ' ~ attributes.class -}}"
{{- attributes ? attributes|without(class) -}}>
@mariohernandez
mariohernandez / story
Created March 21, 2024 17:43
Storybook Story Scafolding
import parse from 'html-react-parser';
// Imports decorators for background colors.
import { SantaBarbaraSandBg, VeniceCanalBg } from '../../../../.storybook/decorators';
import callout from './callout.twig';
import data from './callout.yml';
const settings = {
title: 'Components/Callout',
@mariohernandez
mariohernandez / .gitkeep
Last active March 24, 2024 19:55
Storybook demo files
We couldn’t find that file to show.
@mariohernandez
mariohernandez / raw
Created May 13, 2024 03:02
Blog post raw code snippet wrapper
{% raw %}
```js
```
{% endraw %}