Skip to content

Commit

Permalink
Merge branch 'release/0.5.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
Flo0807 committed Jun 27, 2024
2 parents 6c4e6eb + 0bbb5df commit 8a59283
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 25 deletions.
46 changes: 23 additions & 23 deletions demo/assets/tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,39 +48,39 @@ module.exports = {
// See your `CoreComponents.icon/1` for more information.
//
plugin(function ({ matchComponents, theme }) {
let iconsDir = path.join(__dirname, "../deps/heroicons/optimized")
let values = {}
let icons = [
["", "/24/outline"],
["-solid", "/24/solid"],
["-mini", "/20/solid"],
["-micro", "/16/solid"]
const iconsDir = path.join(__dirname, '../deps/heroicons/optimized')
const values = {}
const icons = [
['', '/24/outline'],
['-solid', '/24/solid'],
['-mini', '/20/solid'],
['-micro', '/16/solid']
]
icons.forEach(([suffix, dir]) => {
fs.readdirSync(path.join(iconsDir, dir)).forEach(file => {
let name = path.basename(file, ".svg") + suffix
const name = path.basename(file, '.svg') + suffix
values[name] = { name, fullPath: path.join(iconsDir, dir, file) }
})
})
matchComponents({
"hero": ({ name, fullPath }) => {
let content = fs.readFileSync(fullPath).toString().replace(/\r?\n|\r/g, "")
let size = theme("spacing.6")
if (name.endsWith("-mini")) {
size = theme("spacing.5")
} else if (name.endsWith("-micro")) {
size = theme("spacing.4")
hero: ({ name, fullPath }) => {
const content = fs.readFileSync(fullPath).toString().replace(/\r?\n|\r/g, '')
let size = theme('spacing.6')
if (name.endsWith('-mini')) {
size = theme('spacing.5')
} else if (name.endsWith('-micro')) {
size = theme('spacing.4')
}
return {
[`--hero-${name}`]: `url('data:image/svg+xml;utf8,${content}')`,
"-webkit-mask": `var(--hero-${name})`,
"mask": `var(--hero-${name})`,
"mask-repeat": "no-repeat",
"background-color": "currentColor",
"vertical-align": "middle",
"display": "inline-block",
"width": size,
"height": size
'-webkit-mask': `var(--hero-${name})`,
mask: `var(--hero-${name})`,
'mask-repeat': 'no-repeat',
'background-color': 'currentColor',
'vertical-align': 'middle',
display: 'inline-block',
width: size,
height: size
}
}
}, { values })
Expand Down
2 changes: 1 addition & 1 deletion guides/get_started/installation.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ In your `mix.exs`:
defp deps do
[
...
{:backpex, "~> 0.3.1"}
{:backpex, "~> 0.5.1"}
]
end
```
Expand Down
2 changes: 1 addition & 1 deletion mix.exs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
defmodule Backpex.MixProject do
use Mix.Project

@version "0.5.0"
@version "0.5.1"
@source_url "https://github.com/naymspace/backpex"

def project do
Expand Down

0 comments on commit 8a59283

Please sign in to comment.