general componenets
This commit is contained in:
parent
82e1ec78d5
commit
6fbce729b4
1 changed files with 15 additions and 0 deletions
15
pyinvoice/components.py
Normal file
15
pyinvoice/components.py
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
from reportlab.platypus import Paragraph, Table
|
||||||
|
from reportlab.lib.styles import ParagraphStyle, getSampleStyleSheet
|
||||||
|
from reportlab.lib import colors
|
||||||
|
|
||||||
|
|
||||||
|
class CodeSnippet(Paragraph):
|
||||||
|
style = ParagraphStyle(
|
||||||
|
name='CodeSnippet',
|
||||||
|
parent=getSampleStyleSheet()['Code'],
|
||||||
|
backColor=colors.lightgrey, leftIndent=0,
|
||||||
|
borderPadding=(5, 5, 5, 5)
|
||||||
|
)
|
||||||
|
|
||||||
|
def __init__(self, code):
|
||||||
|
Paragraph.__init__(self, code, self.style)
|
Loading…
Reference in a new issue