Open caendesilva opened 1 year ago
cc @xiCO2k - this could be done with unicode chars.
cc @xiCO2k - this could be done with unicode chars.
Here's my super crude proof of concept, as I'm not sure how the library works under the hood. Result looks pretty smooth IMHO.
$width = 20;
$spacing = str_repeat(' ', $width);
$lines = str_repeat('─', $width);
$line1 = sprintf('<span class="text-blue-500">%s</span>',
str_replace(' ', ' ',
str_pad('Hello World!', $width, ' ', STR_PAD_BOTH)
)
);
render(<<<HTML
<div class="text-green-500">
<br>
╭{$lines}╮<br>
│{$spacing}│<br>
│{$line1}│<br>
│{$spacing}│<br>
╰{$lines}╯
<br>
</div>
HTML
);
Yes, that is a good idea, @caendesilva if you want to take this one, go ahead.
Yes, that is a good idea, @caendesilva if you want to take this one, go ahead.
I'll try it out, might take a little bit as I have to learn how the package works internally. I'll keep you posted.
I think something like this would be quite cool.